Open
Bug 239152
Opened 21 years ago
Updated 2 years ago
Make DoneCreatingElement more useful
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: sicking, Unassigned)
References
Details
jst and I got an idea talking on irc the other day. Right now we have a bunch of
elements that needs special attention in the contentsink (and XSLT
resulthandler). While some of it in there is due to sheer lazyness (like
title-elements) on our side, others give us actual performance benefit (<style>)
or genually needs it in the current implementation (<script>).
The issue is that we don't want these elements to do anything, like parse
contained text into script or css, until they are fully parsed.
So the idea is to make it possible for elements to always rely on
DoneCreatingElement being called after an it is fully parsed, including its
childnodes. In order to do that we need to call that function in the
contentsink, the xslt resulthandler and in nsDocument::CreateElement(NS).
This way scripts and stylesheets can be treated like normal elements and
internally they won't trigger any stylesheet/script loads until
DoneCreatingElement is called.
![]() |
||
Comment 1•21 years ago
|
||
Note we could also use this to get rid of some hacks in nsHTMLImageElement...
(we don't want to start loading the image till we're in the DOM when being
parsed, etc).
Reporter | ||
Comment 2•21 years ago
|
||
I'll take this. Fixing this will also allow us to remove DoneAddingChildren from
various elements.
Assignee: general → bugmail
In 217715 I have generalized the DoneAddingChildren() method by moving it to
nsIContent and having it called for <select>, <applet>, <object> and <textarea>.
It only gets called on elements created by the parser. (I rely on passing in a
parameter to the constructor to tell these elements whether they're being
created by the parser and so should expect a DoneAddingChildren().)
I'm not sure how that affects what you want to do here.
Reporter | ||
Updated•19 years ago
|
Reporter | ||
Updated•19 years ago
|
Updated•15 years ago
|
QA Contact: ian → general
Comment 4•13 years ago
|
||
Jonas, are you still planning to do anything in this bug?
Reporter | ||
Comment 5•13 years ago
|
||
I think this is something that we should do, but I'm not planning on doing it.
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
Comment 6•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: jonas → nobody
You need to log in
before you can comment on or make changes to this bug.
Description
•