summaryrefslogtreecommitdiff
path: root/content/handlers/javascript/duktape/Document.bnd
diff options
context:
space:
mode:
Diffstat (limited to 'content/handlers/javascript/duktape/Document.bnd')
-rw-r--r--content/handlers/javascript/duktape/Document.bnd21
1 files changed, 21 insertions, 0 deletions
diff --git a/content/handlers/javascript/duktape/Document.bnd b/content/handlers/javascript/duktape/Document.bnd
index d9bff0a16..de96cd864 100644
--- a/content/handlers/javascript/duktape/Document.bnd
+++ b/content/handlers/javascript/duktape/Document.bnd
@@ -433,6 +433,27 @@ method Document::createEvent ()
return 1;
%}
+getter Document::implementation ()
+%{
+ /* Create a new DOMImplementation instance */
+ duk_push_this(ctx);
+ duk_get_prop_string(ctx, -1, MAGIC(DOMImplementation));
+ if (duk_is_undefined(ctx, -1)) {
+ duk_pop(ctx);
+
+ if (dukky_create_object(ctx,
+ PROTO_NAME(DOMIMPLEMENTATION),
+ 0) != DUK_EXEC_SUCCESS) {
+ return duk_error(ctx,
+ DUK_ERR_ERROR,
+ "Unable to create dom implementation object");
+ }
+ duk_dup(ctx, -1);
+ duk_put_prop_string(ctx, -3, MAGIC(DOMImplementation));
+ }
+ return 1;
+%}
+
getter Document::onabort();
setter Document::onabort();
getter Document::onautocompleteerror();