Closed
Bug 742143
Opened 12 years ago
Closed 12 years ago
12.0beta doesn't allow .innerHTML on MATHML element in HTML5
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 611885
People
(Reporter: jmichae3, Unassigned)
Details
Attachments
(1 file)
8.39 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0 Build ID: 20120328051619 Steps to reproduce: set .innerHTML of mathml element within HTML5 such as <mn> to change its content e.g. <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>mathml id test</title> </head> <body> <p><math><mn id="o"><mn></math></p> <script type="text/javascript"> document.getElementById('o').innerHTML=12; </script> </body> </html> Actual results: blank page Expected results: should see a 12, or so I thought. http://www.w3.org/TR/2010/PR-MathML3-20100810/chapter2.html#id.2.1.5.1 specifies that mathml elements can have an id attribute. it does not say what you can DO with that attribute however. but I assumed that since mathml is part of HTML5, and SVG is part of HTML5, that I could use .innerHTML on those to modify their contents.
Reporter | ||
Comment 1•12 years ago
|
||
workaround for my web page: ...<mn><span id="o"></span><mn>... this does not really fix the problem though. and by the way, I don't think this is valid MATHML!
Comment 2•12 years ago
|
||
https://developer.mozilla.org/en/DOM:element.innerHTML links to http://www.w3.org/TR/2008/WD-html5-20080610/dom.html#innerhtml0 which suggests innerHTML is only valid on HTMLElements. But http://www.whatwg.org/specs/web-apps/current-work/#dom-innerhtml links to http://html5.org/specs/dom-parsing.html#innerhtml which says it's valid on all Elements.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Summary: 12.0beta doesn't allow .innerHTML on id of MATHML element in HTML5 → 12.0beta doesn't allow .innerHTML on MATHML element in HTML5
Comment 3•12 years ago
|
||
For now, the simplest solution is to use DOM2 createTextNode and appendChild. Or set innerHTML on an HTML <p> that contains the entire MathML subtree.
Reporter | ||
Comment 4•11 years ago
|
||
this is still an issue in 19.02
Updated•11 years ago
|
Attachment #612068 -
Attachment mime type: text/plain → text/html
Reporter | ||
Comment 5•11 years ago
|
||
you resolved my bug as a duplicate of someone else'e bug, and theirs is marked as a duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=811701 so, they say mine is totally unrelated to theirs. maybe you can unchain it or something. thanks.
Reporter | ||
Comment 6•11 years ago
|
||
hmm. did not intend to post comment 5. this bug is a duplicate of bug 611855, but there is a relationship chain break between bug 611855 and bug 859693. they say no relation.
You need to log in
before you can comment on or make changes to this bug.
Description
•