Bug 3301 - innerHTML does not work for xhtml documents
Summary: innerHTML does not work for xhtml documents
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Anders Carlsson
Depends on:
Reported: 2005-06-07 08:32 PDT by Nicholas Shanks
Modified: 2005-08-19 09:24 PDT (History)
2 users (show)

See Also:

Implement setting innerHTML for xhtml documents (9.17 KB, patch)
2005-08-05 00:59 PDT, Anders Carlsson
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Shanks 2005-06-07 08:32:44 PDT
When an XML page is transformed via a stylesheet to (X)HTML, and the resulting HTML has an onload 
script in it's body tag, this script is not executed.

An example can be found at http://astro.nickshanks.com/library/extrasolar.xml
Pre-processed HTML output can be found at http://astro.nickshanks.com/library/extrasolar.en
The two pages should look identical. The latter was produced by libxslt processing of the former.
Comment 1 Dave Hyatt 2005-06-07 08:43:15 PDT
I believe this has been fixed recently.  Given that page has other issues (like the DTD issue) can you attach 
a simpler test case just so we can verify?
Comment 2 Nicholas Shanks 2005-06-07 09:17:57 PDT
Test case: http://web.nickshanks.com/safari/xslt-js.xml (fails with 412)
HTML Version: http://web.nickshanks.com/safari/xslt-js.html (passes with 412)
XSL used: http://web.nickshanks.com/safari/xslt-js.xsl
Comment 3 Dave Hyatt 2005-06-07 09:21:54 PDT
Hmmm, I was wrong.  This does not pass.
Comment 4 Darin Adler 2005-06-07 09:25:27 PDT
The bug I fixed recently is fixes the test case in layout tests: fast/events/xsl-onload.xhtml.
I guess the test case attached here wasn't fixed by that change.
Comment 5 Anders Carlsson 2005-07-14 01:37:07 PDT
Turns out that this bug was a completely different one. I'm working on this so I'll reassign it to me.
Comment 6 Anders Carlsson 2005-08-05 00:59:05 PDT
Created attachment 3228 [details]
Implement setting innerHTML for xhtml documents
Comment 7 Darin Adler 2005-08-06 12:14:09 PDT
Comment on attachment 3228 [details]
Implement setting innerHTML for xhtml documents

In the past Dave Hyatt has suggested that things like innerHTML should not be
implemented for XML documents. I'd like to hear his take on this.

Other than that, this looks good.
Comment 8 Anders Carlsson 2005-08-06 12:16:25 PDT
OK. For the record, Deer Park has this feature now and that's kinda why I implemented it.
Comment 9 Maciej Stachowiak 2005-08-17 23:07:00 PDT
Comment on attachment 3228 [details]
Implement setting innerHTML for xhtml documents

looks good