hust-marx / firebreath

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

Event not work in IE #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Create Standard Plugin 
named test, changed files in attach

What is the expected output? What do you see instead?
For Firefox 3.6 the event method is called.
For IE8 the event method is NOT called.
Other functions and properties are working correct in IE.

What version of the product are you using? On what operating system?
firebreath-1.0rc3
IE8
Windows 7, Visual Studio 2008

Please provide any additional information below.
additional information in attach

Original issue reported on code.google.com by itmyaddress@gmail.com on 26 Feb 2010 at 5:03

Attachments:

GoogleCodeExporter commented 9 years ago
you are using an obsolete/deprecated way of attaching a method; thus it had not 
been
adequately tested in RC3.  Can you try this from source control and see if it is
fixed there?  I believe this bug was found and fixed a few weeks ago.

Original comment by taxilian on 26 Feb 2010 at 5:09

GoogleCodeExporter commented 9 years ago

Original comment by taxilian on 26 Feb 2010 at 5:10

GoogleCodeExporter commented 9 years ago
I download from source control. Errors in IE disappeared, and event is called. 
What is a 
correct way of attaching event methods?

Original comment by itmyaddress@gmail.com on 26 Feb 2010 at 5:33

GoogleCodeExporter commented 9 years ago
Well, in your case I'd probably use the jquery method, which is probably 
something like:

$("pluginJoy").bind("test", function() {
    ....

});

I haven't actually tested that code, not certain if it works, but probably 
would. 
What it does behind the scenes is different on different browsers.

IE:

document.getElementById("pluginJoy").attachEvent("ontest", function() { 
alert("ha
ha"); });

Others:

document.getElementById("pluginJoy").addEventListener("ontest", function() {
alert("ha ha"); }, false);

Original comment by taxilian on 26 Feb 2010 at 5:48