fixes and tweaks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2021-04-07 12:30:38 +03:00
parent 174d7292ba
commit 94be78d772
2 changed files with 9 additions and 6 deletions

View File

@ -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 },
})

View File

@ -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": {