Closed
Bug 923913
Opened 11 years ago
Closed 11 years ago
Make Element.innerHTML [Pure]?
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(3 files, 1 obsolete file)
403 bytes,
patch
|
Details | Diff | Splinter Review | |
10.34 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
13.31 KB,
patch
|
Details | Diff | Splinter Review |
bz had the idea to make innerHTML (getter) [Pure]. Trying to figure out whether that is actually possible.
Assignee | ||
Comment 1•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=658096800cd8
Assignee | ||
Comment 2•11 years ago
|
||
On my machine time goes from ~235ms to ~8ms
Assignee | ||
Comment 3•11 years ago
|
||
hmm, perhaps .innerHTML may throw but .outerHTML doesn't. Will test and figure out why we have the code paths we have.
Assignee | ||
Comment 4•11 years ago
|
||
Or vice versa, outerHTML may, but innerHTML may not... Anyhow, will try to investigate tomorrow.
Assignee | ||
Comment 5•11 years ago
|
||
So we do serialize for example comment which has -- in the data.
Assignee | ||
Comment 6•11 years ago
|
||
And so does blink.
Assignee | ||
Comment 7•11 years ago
|
||
I haven't managed to make any browser throw from innerHTML getter http://mozilla.pettay.fi/moztests/innerhtml-01.xhtml (taken from https://github.com/whatwg/domparsing/blob/master/tests/innerhtml-01.xhtml) and http://mozilla.pettay.fi/moztests/xhtml_innerHTML_outerHTML.xhtml
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 8•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=9eb5ac196105
Assignee: nobody → bugs
Attachment #813941 -
Attachment is obsolete: true
Attachment #814445 -
Flags: review?(bzbarsky)
Comment 9•11 years ago
|
||
Comment on attachment 814445 [details] [diff] [review] patch Make GetMarkup return void, and r=me
Attachment #814445 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 10•11 years ago
|
||
Assignee | ||
Comment 11•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=dfdca5ae83fe
Assignee | ||
Comment 12•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/772be3f89d8e
Comment 13•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/772be3f89d8e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Comment 14•11 years ago
|
||
In order to know if we need to update documentation or not, I have one question: Does this change the behavior users see? Or is it just adding semantics acknowledging that innerHTML will never throw?
Flags: needinfo?(bugs)
Assignee | ||
Comment 15•11 years ago
|
||
This should not change the semantics. (But the spec may change to say empty string is returned in case of XML document and non-serializable DOM.)
Flags: needinfo?(bugs)
You need to log in
before you can comment on or make changes to this bug.
Description
•