From bf4382e3ec9af8e65e0903af7b1f492454877558 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Sun, 31 Jan 2016 12:19:58 +0000 Subject: HTMLElement: stub .style getter. For #2413. --- javascript/duktape/HTMLElement.bnd | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'javascript') diff --git a/javascript/duktape/HTMLElement.bnd b/javascript/duktape/HTMLElement.bnd index d2b913a6e..b3de9c8fe 100644 --- a/javascript/duktape/HTMLElement.bnd +++ b/javascript/duktape/HTMLElement.bnd @@ -151,3 +151,12 @@ getter HTMLElement::onwaiting(); setter HTMLElement::onwaiting(); getter HTMLElement::onwheel(); setter HTMLElement::onwheel(); + +getter HTMLElement::style() +%{ + /* Minimal implementation to avoid infinite-loop in Modernizr (c.f. #2413) */ + if (dukky_create_object(ctx, PROTO_NAME(CSSSTYLEDECLARATION), 0) != DUK_EXEC_SUCCESS) { + return 0; + } + return 1; +%} -- cgit v1.2.3