"Show anonymous content" hides dynamically created child nodes

RESOLVED INVALID

Status

RESOLVED INVALID
13 years ago
11 years ago

People

(Reporter: mnyromyr, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

264 bytes, application/vnd.mozilla.xul+xml
Details
(Reporter)

Description

13 years ago
Given a XUL element with an XBL binding without a <children> tag in its <content>, eg. a checkbox, and some JS-generated child nodes to that element, DOMI with "show anonymous content" turned on will only show the anonymous content in its DOM tree, but not the dynamic children. Turning "show anonymous content" off will show the generated elements, but, of course, not the anonymous content...

This is quite surprising behaviour, as one expects to see all nodes in that case.
(Especially since the generated elements are accessible as usual via the Javascript panel.)
(Reporter)

Comment 1

13 years ago
Created attachment 219990 [details]
Testcase

XUL testcase with a checkbox getting a JS-generated child node.
We just show what the core stuff reports to us.  If you have a problem with the way XBL handles document mutations, that's a different issue, but there are already lots of bugs on that.

[Note that if you start off with the <createdElement> as a child of the textbox, the rendering is different than if you append it dynamically; that's XBL screwing up for you.]
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
(Reporter)

Comment 4

13 years ago
Boris, I disagree:

> We just show what the core stuff reports to us.
> If you have a problem with the way XBL handles document mutations, 
> that's a different issue, but there are already lots of bugs on that.

XBL is not the problem here. The XBL shall not include child nodes and so it does. That's perfectly okay here.

The thing is that DOMI's menu item "Show anonymous content" doesn't really imply that it actually does mean "Show *only* the content that's part of the anonymous content structure, and nothing else".
This created element is part of the DOM and it should be possible in DOMI to see both at once, imo.

> [Note that if you start off with the <createdElement> as a child of the
> textbox, the rendering is different than if you append it dynamically;
> that's XBL screwing up for you.]

Yeah, I know. 
So your answer is essentially "don't fix DOMI because XBL is broken"?



 


> XBL is not the problem here. 

Trust me.  It is.  ;)

> The XBL shall not include child nodes

Actually, no. In this case XBL should show the child node and not the anonymous content from the binding.

> doesn't really imply that it actually does mean

It means "show whatever content Gecko tells us about".  In this case, Gecko is lying.

My answer is "fix XBL and this will just work; there's no way to fix this without fixing XBL".
Assignee: dom-inspector → nobody
QA Contact: timeless → dom-inspector
You need to log in before you can comment on or make changes to this bug.