Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

Processing instructions are now added to XUL document's DOM

已查看 2 次
跳至第一个未读帖子

Nickolay Ponomarev

未读,
2006年11月12日 12:14:182006/11/12
收件人 dev-pl...@lists.mozilla.org、dev-te...@lists.mozilla.org、Mozdev Project Owners List
Hey,

Bug 319654 <https://bugzilla.mozilla.org/show_bug.cgi?id=319654> was
fixed on trunk recently. Now processing instructions (e.g.
<?xml-stylesheet?> and <?xul-overlay?>) will appear in a XUL
document's DOM.

This means, you can no longer use document.firstChild in XUL scripts
to get the root element of a XUL document (as it may now return a PI
node in a document's prolog). Use document.documentElement instead.

Another change is that the xml-stylesheet and xul-overlay processing
instructions outside the prolog no longer have any effect. You may
need to change your XUL to fix this. For example,

<overlay id="downloadManagerOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
....
</overlay>

should be changed to

<?xul-overlay href="chrome://browser/content/macBrowserOverlay.xul"?>
<overlay id="downloadManagerOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
....
</overlay>

Nickolay

0 个新帖子