#14635 closed bug (notabug)
Html Component Events with typeof undefined in IE11
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In IE 8, 9 and 10, when you get typeof an EVENT defined by an HTC the result is the same of property linked in this manner. In IE 11 it returns "undefined", so I can't call function within.
I attach a sample of code with this behavior.
index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="jquery-1.10.2.js"></script> <script type="text/javascript"> function onComplete() { alert("start"); } </script> </head> <body> <button onclick="OpenNewWindow()">Click me</button> <script> function OpenNewWindow() { var oPage = document.body; var gObjExecuter = document.createElement("DIV"); gObjExecuter.style.visibility = "hidden"; gObjExecuter.oncomplete = function () { onComplete(); }; gObjExecuter.style.behavior = "url(Wizard.htc)"; oPage.appendChild(gObjExecuter); } </script> </body> </html>
Wizard.htc
<ATTACH EVENT="onreadystatechange" HANDLER="DoInit"/> <PUBLIC:EVENT NAME="oncomplete" Id="oncomplete"/> <script language="javascript" src="Wizard.js"></script>
Wizard.js
function DoInit() { if (readyState == "complete") { var prova = $(this).attr("oncomplete"); alert(typeof prova); $(prova)(); } }
Thank you Nicolás
Change History (3)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
This isn't a jQuery bug report. Ask for help on StackOverflow or elsewhere.
comment:3 Changed 9 years ago by
jQuery does not respond in the same manner in two different browser. Are you telling me that is a code problem? You are not reading this bug. If you remove event in htc, jQuery respond in the same manner between IE 10 and IE 11. It is a problem with IE 11 compatibility!
PS: I'm sorry for code pasted, but it doesn't work on JsFiddle.