Open
Bug 1090390
Opened 10 years ago
Updated 2 years ago
No way I can find to see what namespace an element is in
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(Not tracked)
NEW
People
(Reporter: bzbarsky, Unassigned)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
STEPS TO REPRODUCE:
1) Load the following testcase:
data:text/html,<script>var e = document.documentElement; e.appendChild(document.createElement("svg")); e.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"))</script>
2) Try to tell, in the inspector, which namespaces those elements are in.
EXPECTED RESULTS: Have a way to tell that so you know why one works and the other doesn't.
ACTUAL RESULTS: No way to tell.
Comment 1•10 years ago
|
||
True, there's no obvious way to find this information out.
There is a not-so-hard way though:
- right click on the node
- select "Show DOM Properties"
- in the object view that appears below, either scroll to namespaceURI or use the search field at the top (much faster).
Bug 704094 aimed at adding this as a sidebar panel directly. This would make it more discoverable and would save a click too.
Reporter | ||
Comment 2•10 years ago
|
||
Sadly, that doesn't work reliably:
<script>
var el = document.createElementNS("foo", "bar");
Object.defineProperty(el, "namespaceURI", { value: "evil" });
document.documentElement.appendChild(el);
</script>
that shows "evil" under "Show DOM properties", whereas the string I'm after is "foo".
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•