[Project_owners] methods and fields in XBL bindings
grimholtz at yahoo.com
Sat Apr 30 14:51:48 EDT 2005
Disclaimer: I know next to nothing about XBL.
Anytime I get JS errors that occur only sometimes, it's inevitably a
"timing" issue. In other words, sometimes the referred object has
been created before it's used, other times not.
The way I get around this is using setTimeout(fcn, msecs). You can
see firefox's browser.js does this in delayedOpenWindow() -- called,
I think, when you select file->open location.
So maybe you can move the code in your CDATA section into a function,
replacing the code within <body/> with setTimeout(fcn, 50) or the
--- Philip Chee <philip at aleytys.pc.my> wrote:
> Flashbock uses userContent.css to bind flash objects to our XBL.
> We are trying to refactor the XBL but are running into several
> However the errors don't ALWAYS occur, only about 50% of the time.
> In our test XBL we have the following:
> <binding id="flash">
> <field name="test">
> <method name="block">
> <parameter name="type" />
> //...some code to do our bit.
> The JS error we get is "this.block is not a function", however
> putting some
> alert boxes I find that SOMETIMES it's undefined, sometimes it
> works as
> expected. Similarly the "test" field is sometimes undefined and
> returns the expected value. What am I doing wrong?
> Philip Chee <philip at aleytys.pc.my>
> Guard us from the she-wolf and the wolf, and guard us from the
> oh Night, and so be good for us to pass.
> Project_owners mailing list
> Project_owners at mozdev.org
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the Project_owners