Skip to main content

Bug Tracker

Side navigation

#14635 closed bug (notabug)

Opened December 13, 2013 01:24PM UTC

Closed December 23, 2013 04:14PM UTC

Last modified December 24, 2013 09:02AM UTC

Html Component Events with typeof undefined in IE11

Reported by: nicolas@dirisio.net 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

Attachments (0)
Change History (3)

Changed December 13, 2013 01:26PM UTC by nicolas@dirisio.net comment:1

PS:

I'm sorry for code pasted, but it doesn't work on JsFiddle.

Changed December 23, 2013 04:14PM UTC by dmethvin comment:2

resolution: → notabug
status: newclosed

This isn't a jQuery bug report. Ask for help on StackOverflow or elsewhere.

Changed December 24, 2013 09:02AM UTC by anonymous comment:3

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!