https://bugzilla.wikimedia.org/show_bug.cgi?id=57586

       Web browser: ---
            Bug ID: 57586
           Summary: VisualEditor: Consider using
                    document.implementation.createHTMLDocument() in
                    ve.createDocumentFromHTML
           Product: VisualEditor
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Technical Debt
          Assignee: roan.katt...@gmail.com
          Reporter: roan.katt...@gmail.com
                CC: jforres...@wikimedia.org, krinklem...@gmail.com,
                    roan.katt...@gmail.com, tpars...@wikimedia.org
    Classification: Unclassified
   Mobile Platform: ---

To figure out:
* Does this work in all browsers we support? I have anecdotally confirmed
support in Firefox 25 and Chrome 30
* Protocol-relative URLs in <base> are broken, because documents created this
way don't have a creator context or whatever.

Benefits:
* Not a hack involving iframes :)
* Faster than the iframe hack
* Does not have issues with HTTPSEverywhere in Firefox

For the <base> issue, it looks like something like this will work:

>>> d.querySelector('base')
<base href=​"/​/​example.com">​
>>> d.baseURI
null
>>> d.querySelector('base').getAttribute('href')
"//example.com"
>>> d.querySelector('base').setAttribute('href', 'http://example.com');
undefined
>>> d.baseURI
"http://example.com/";

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to