I want to implement a base XBL widget in pure JS without having to go through the agro of "implements" ala XPConnect etc.
I can get a fair way swapping around the __proto__ object of the XBL binding in its constructor, but before I spend any more time on does anyone
know if it's even possible or am I likely to badly bust something down the line?
Basically:
XBLBase implements myBaseJsObject
XBLWidget extends XBLBase
Cheers,
N
If you insert your object into the proto chain instead of just setting
it as your prototype but not keeping the things that used to be there,
it should more or less work, I think. Otherwise fields won't work
right, at the very least.
-Boris
Hi Boris,
Thanks for your thoughts.
I spent all day yesterday on this, and after getting past some cyclic __proto__ errors, I ended up with more hacks and errors than efficiency
improvements. So I've shelved this for the moment and put it in the "To Be Refactored" bucket for now.
Cheers,
Neil