Closed
Bug 751102
Opened 13 years ago
Closed 12 years ago
Inspector doesn't display HTML comments
Categories
(DevTools :: Inspector, defect)
DevTools
Inspector
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: baptx.is, Unassigned)
Details
Attachments
(2 files, 2 obsolete files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.3) Gecko/20100101 Firefox/10.0.3 Iceweasel/10.0.3
Build ID: 20120330174115
Steps to reproduce:
<html>
<head>
<script>
function creatingComment() {
var commentContainer = document.getElementById("commentContainer");
var comment = document.createComment("Dynamically generated comment");
commentContainer.appendChild(comment);
alert(commentContainer.firstChild.nodeValue);
}
</script>
</head>
<body>
<div id="commentContainer"></div>
<input type="button" onclick="creatingComment();"></input>
</body>
</html>
Actual results:
Firefox DOM Inspector doesn't display HTML comments created dynamically.
Firebug does, Opera Dragonfly too.
Correction: Firefox DOM Inspector doesn't display comments at all, even if they're hard coded in HTML element.
Summary: DOM Inspector doesn't display dynamically created comments (document.createComment) → DOM Inspector doesn't display HTML comments
Comment 2•13 years ago
|
||
Are you talking about the DOM Inspector extension or the builtin Inspector?
Comment 3•13 years ago
|
||
I can confirm that comment node does not appear in html markup panel of built-in inspector.
(it appears in DOM Node pane of DOM inspector extension)
Updated•13 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•13 years ago
|
Component: Untriaged → Developer Tools: Inspector
QA Contact: untriaged → developer.tools.inspector
Updated•13 years ago
|
Summary: DOM Inspector doesn't display HTML comments → Inspector doesn't display HTML comments
I didn't know there was an extension with this name too, I was talking about built-in DOM inspector.
One thing I want to correct: when sharing the createComment code I've encountered another problem, try renaming the function creatingComment to createComment and you will see.
"Not enough arguments [nsIDOMHTMLDocument.createComment]"
The browser think we want to call document.createComment instead of the createComment function.
I was using the inline javascript method onclick="createComment();" because it's quick when sharing an example even if it's deprecated. I will avoid this by now.
This problem does not happen when using addEventListener, I updated the code in attachment for dynamic comments.
Attachment #620358 -
Attachment is obsolete: true
Attachment #620362 -
Attachment is obsolete: true
My attachment isn't recognized as text/html and is displayed in a <pre> tag..
Updated•13 years ago
|
Attachment #620369 -
Attachment mime type: text/plain → text/html
Severity: normal → major
OS: Linux → All
Hardware: x86_64 → All
Version: 10 Branch → unspecified
Attachment #620362 -
Attachment mime type: text/plain → text/html
Attachment #620358 -
Attachment mime type: text/plain → text/html
Updated•13 years ago
|
Severity: major → normal
Firefox 13 and the problem is still here.. Will you correct it?
I've just noticed that comments will appear in Firefox Inspector if they are appended to the body, for example document.body.appendChild(document.createComment("this comment is working")); but the 2 examples in attachments (comments in a div tag) are STILL NOT working.
Comment 9•13 years ago
|
||
Please be patient. This is not a priority yet. And please stop changing the severity of this bug.
Severity: critical → normal
Comment 10•12 years ago
|
||
This has been fixed by the new markup panel.
Bug triage, filter on PINKISBEAUTIFUL
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•