Closed
Bug 373652
Opened 18 years ago
Closed 8 years ago
Implement XBL baseBinding (calling super) and named implementations
Categories
(Core :: XBL, defect)
Core
XBL
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: BenB, Unassigned)
References
()
Details
(Keywords: helpwanted)
http://developer.mozilla.org/en/docs/XBL:XBL_1.0_Reference:Binding_Implementations#Inheritance_of_Implementations
I need a way to call super. I have a binding that |extends| another binding, and overrides a function, but just wants to add things, thus still calling the base binding's function. For example:
<binding id="bar"
extends="chrome://.../foo.xml#foo">
<implementation>
<method name="addItem">
<parameter name="item"/>
<body><![CDATA[
doFluff()
this.baseBinding.addItem(item);
]]></body>
</method>
</implementation>
The above spec says that this should work, but I only get a
TypeError: this.baseBinding has no properties
Comment 1•18 years ago
|
||
I suspect that we're not going to be adding features to the current XBL implementation before work begins on XBL2 (http://www.mozilla.org/projects/xbl/xbl2.html). I don't know whether this use-case is supported by the XBL2 spec.
Comment 2•18 years ago
|
||
Ah, a text search on that spec shows that it does indeed specify baseBinding.
Reporter | ||
Comment 3•18 years ago
|
||
If you didn't even start, I suspect it's not going to be done, much less usable, within the next year or so?
This bug won't be hard to implement, would it? It's easy in JS. You probably just need to place a JS property in the JS scope.
Comment 4•18 years ago
|
||
(In reply to comment #3)
> If you didn't even start, I suspect it's not going to be done, much less
> usable, within the next year or so?
I'm don't know for sure, but that sounds like a reasonable estimate, I guess.
> This bug won't be hard to implement, would it? It's easy in JS. You probably
> just need to place a JS property in the JS scope.
I can't really comment on how hard it would be, because I don't know offhand. Implementing it for 1.9 does sound better than the vague "wait for XBL2", I agree, but then you probably need to find someone to do it :)
Comment 5•18 years ago
|
||
> This bug won't be hard to implement, would it?
Patches accepted.
Keywords: helpwanted
Reporter | ||
Comment 6•18 years ago
|
||
> Patches accepted.
OK :). If it pains me too much, I'll do that.
-> self
Assignee: general → ben.bucksch
Updated•15 years ago
|
QA Contact: ian → xbl
Reporter | ||
Updated•14 years ago
|
Assignee: ben.bucksch → nobody
Reporter | ||
Updated•14 years ago
|
Summary: Implement baseBinding (calling super) and named implementations → Implement XBL baseBinding (calling super) and named implementations
Reporter | ||
Comment 7•14 years ago
|
||
http://groups.google.com/group/mozilla.dev.tech.xbl/browse_thread/thread/2bf7cbaae6bcd214
Patrick Cloke wrote on m.d.platform, thread "XBL method scope (inheritence) ??":
You can call the parent one pretty easy with:
this.__proto__.__proto__.<method name>.call(this[, paramters]);
Comment 9•10 years ago
|
||
I think the plan is to get rid of XBL eventually.
Comment 10•10 years ago
|
||
And what will be provided as a replacement?
Comment 11•10 years ago
|
||
Not sure about the plan, but if we want to get rid of XBL, the replacement
would be some form of web components (not exactly what is in the current draft specs, but something a bit better).
Comment 12•8 years ago
|
||
Web Components \o/
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•