Please implemement a setter for the HTMLDetailsElement so the JS myDetailsElem.open = true; does not fail with this error anymore:
EcmaError: TypeError: Cannot set property [HTMLDetailsElement].open that has only a getter to value 'true'.
Something like:
Object.defineProperty(HTMLDetailsElement.prototype, 'open', {
set: function(toOpen) {
var isOpen = this.hasAttribute("open");
if (isOpen != toOpen)
{
if (toOpen)
this.setAttribute("open", "");
else
this.removeAttribute("open");
}
}
});
appears to work for me, feel free to do something similar in htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDetailsElement.java
Please implemement a setter for the
HTMLDetailsElementso the JSmyDetailsElem.open = true;does not fail with this error anymore:Something like:
appears to work for me, feel free to do something similar in htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLDetailsElement.java