Closed
Bug 923913
Opened 12 years ago
Closed 12 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•12 years ago
|
||
Assignee | ||
Comment 2•12 years ago
|
||
On my machine time goes from ~235ms to ~8ms
Assignee | ||
Comment 3•12 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•12 years ago
|
||
Or vice versa, outerHTML may, but innerHTML may not... Anyhow, will try to investigate tomorrow.
Assignee | ||
Comment 5•12 years ago
|
||
So we do serialize for example comment which has -- in the data.
Assignee | ||
Comment 6•12 years ago
|
||
And so does blink.
Assignee | ||
Comment 7•12 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•12 years ago
|
Assignee | ||
Comment 8•12 years ago
|
||
Assignee: nobody → bugs
Attachment #813941 -
Attachment is obsolete: true
Attachment #814445 -
Flags: review?(bzbarsky)
![]() |
||
Comment 9•12 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•12 years ago
|
||
Assignee | ||
Comment 11•12 years ago
|
||
Assignee | ||
Comment 12•12 years ago
|
||
Comment 13•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Comment 14•12 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•12 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
•