[webkit-help] Strange behavior in dispatchEvent and CustomEvents

Eduardo Felipe eduardofelipe87 at gmail.com
Thu Jun 10 12:27:18 PDT 2010

Hi folks,

I'm observing CustomEvents not bubbling, even though I set bubbling to
true. The code below:

var evt = document.createEvent("CustomEvent")
evt.initCustomEvent("mycustomevent", true, false)

var someh1 = document.getElementById("someh1")
someh1.addEventListener("mycustomevent", function(){ alert("OMG!"); })


With the HTML below:

    <h1 id="someh1">content!</h1>

Never shows the alert. In my opinion it should. Am I doing something wrong?


Eduardo Felipe

More information about the webkit-help mailing list