Support pushing NULL nodes, by pushing a JS 'null' object instead

This commit is contained in:
Daniel Silverstone 2015-10-21 18:32:40 +02:00
parent 629287c224
commit 79068dd50f

View File

@ -345,6 +345,9 @@ jsobject *js_newcompartment(jscontext *ctx, void *win_priv, void *doc_priv)
/* Now we need to prepare our node mapping table */
duk_push_object(CTX);
duk_push_pointer(CTX, NULL);
duk_push_null(CTX);
duk_put_prop(CTX, -3);
duk_put_global_string(CTX, NODE_MAGIC);
return (jsobject *)ctx;