Closed Bug 384716 Opened 17 years ago Closed 15 years ago

xbl fields override arbitrary js properties when the binding is eventually attached

Categories

(Core :: XBL, defect)

defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: asaf, Unassigned)

References

Details

(Keywords: regression)

In places menu.xml, we do something like this:
  document.addBinding(popup, MENU_URI);
  popup._containerNodesMap = this._containerNodesMap;

If I switch the order here, popup._containerNodesMap is nulled out. This is even worse on non-mac because the binding is applied asynchronously (as a result of |popup.setAttribute("type", "places")|), see bug 384690.
Flags: blocking1.9?
Severity: normal → major
Summary: regression: Arbitrary JS properties are removed once when the xbl binding for an element is attached. → regression: Arbitrary JS properties are removed once the xbl binding for an element is attached.
Any chance to get the regression range?
No longer blocks: 384690
aha, ignore me.

So here's what really happens here,
1) The xbl binding has a <filed> named _foo, set to null.
2) when we set newElement._foo, newElement is not in the document yet, thus the element is not bounded; explicit addBinding calls are ignored too.
3) when the element is eventually bounded, it's _foo field override whatever newElement._foo was set too.

This is arguably the correct behavior I guess...
Summary: regression: Arbitrary JS properties are removed once the xbl binding for an element is attached. → xbl fields override arbitrary js properties when the binding is eventually attached
Actually, even if the field isn't around, explicit call to addBinding nulls out the js property; implicit attaching (via css) seems to work fine though.
If it's a regression, what's the regression range?  In any case, where's a testcase?
Dunno, bug 337855 exposed these behaviors, I'm no longer sure at all that it is a regression (well, I'd hope comment 3 is).
Interesting.  I'd still love a testcase and regression range for whatever issues you see here.
Not a blocker based on the info available. If we'd get a regression range, or testcases showing that this really is a regression, then please renominate.
Flags: blocking1.9? → blocking1.9-
Bug 372769 might fix this bug as currently summarized.  Hard to tell without a testcase...  Care to attach one?
Depends on: 372769
Still waiting on testcase to resolve this.
No response, no testcase... resolving incomplete.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.