mirror of
https://github.com/flynx/types.js.git
synced 2025-10-29 02:20:07 +00:00
fixes and tweaks...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
174d7292ba
commit
94be78d772
13
Promise.js
13
Promise.js
@ -260,12 +260,13 @@ object.Constructor('InteractivePromise', Promise, {
|
||||
var handlers = []
|
||||
|
||||
var onmessage = function(func){
|
||||
// remove all handlers... (XXX TEST)
|
||||
// remove all handlers...
|
||||
if(func === false){
|
||||
obj == null ?
|
||||
handlers.splice(0, handlers.length)
|
||||
: (delete obj.__message_handlers)
|
||||
// remove a specific handler... (XXX TEST)
|
||||
var h = (obj == null ?
|
||||
handlers
|
||||
: (obj.__message_handlers || []))
|
||||
h.splice(0, handlers.length)
|
||||
// remove a specific handler...
|
||||
} else if(arguments[1] === false){
|
||||
var h = (obj == null ?
|
||||
handlers
|
||||
@ -296,6 +297,8 @@ object.Constructor('InteractivePromise', Promise, {
|
||||
Object.defineProperty(obj, '__message_handlers', {
|
||||
value: handlers,
|
||||
enumerable: false,
|
||||
// XXX should this be .configurable???
|
||||
configurable: true,
|
||||
})
|
||||
return obj },
|
||||
})
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-types",
|
||||
"version": "6.0.12",
|
||||
"version": "6.0.13",
|
||||
"description": "Generic JavaScript types and type extensions...",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user