pinkshirt / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

webkit based browsers don't call onload function if plugin is dynamically created #87

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If the object tag is created in javascript the onload function doesn't get 
called until a plugin function is called (which you don't know is safe -- 
because the onload function hasn't been called yet).  So far my testing has 
shown that this bug only effects Safari and Chrome (on OS X -- haven't tested 
windows). 

I've attached an html demonstration of this bug that relies on FBTestPlugin 
being installed.  You'll notice that the onload function doesn't get called 
until you call plugin.alert() (any other function would do as well).  On 
firefox you'll observe the expected behavior that the onload function gets 
called as soon as the plugin is available.

Original issue reported on code.google.com by physics...@gmail.com on 3 Oct 2010 at 8:27

Attachments:

GoogleCodeExporter commented 9 years ago
hmm.  This will require some thought.  The problem is that we can't just rely 
on the window attached event like we do on windows, since things work so 
differently in different models on mac.

In the case you describe, it doesn't request the JSAPI document until you talk 
to it via javascript, and that's one of the points where it calls the "if we 
haven't marked ourselves ready yet, do so now" function.  We need to find a 
point at which we can reliably mark the plugin as "ready to be interacted with" 
where we can be sure that a request for the NPObject will succeed.

Anson, suggestions?

Original comment by taxilian on 3 Oct 2010 at 4:36

GoogleCodeExporter commented 9 years ago
This should be fixed in the latest 1.3 beta build (#50) or the latest from 
either stable or dev repositories

Original comment by taxilian on 6 Oct 2010 at 5:51