Menu

#1748 Missing document.implementation.createHTMLDocument function

Latest SVN
closed
RBRi
None
1
2016-05-25
2016-02-20
No

Class com.gargoylesoftware.htmlunit.javascript.host.dom.DOMImplementation should implement function createHTMLDocument according to this spec:
https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument

I tried to implement patch, but it is impossible to create HtmlPage not connected with any window (such page is needed in case of creation of HTMLDocument using mentioned missing function).

Discussion

  • Adam Afeltowicz

    Adam Afeltowicz - 2016-02-20

    Unit tests for createHTMLDocument function

     
  • Adam Afeltowicz

    Adam Afeltowicz - 2016-02-20

    Attempt of implementation

     
  • RBRi

    RBRi - 2016-02-21

    Hi Adam,

    have added a first rough implementation based on your patch.
    The creation of a Page without a window seems to be more tricky because large parts of the code rely on the associated window.
    Any futher patches are welcome.

    Thanks for your support.

     

    Last edit: RBRi 2016-11-20
  • RBRi

    RBRi - 2016-02-21
    • status: open --> accepted
     
  • Adam Afeltowicz

    Adam Afeltowicz - 2016-02-21

    Such script should be possible to execute:
    var doc = window.document.implementation.createHTMLDocument('inert'); var p = doc.createElement('p'); p.innerHTML = 'test';

    but there is NPE in SimpleScriptable.

    Patch in attachment.

     
  • RBRi

    RBRi - 2016-05-25
    • status: accepted --> closed
    • assigned_to: RBRi
     
  • RBRi

    RBRi - 2016-05-25

    We now support the usual cases and our test suite has some tests for different scenarios.
    Please open a new issue if you still facing problems with this impl.

     

Log in to post a comment.

MongoDB Logo MongoDB