Illegal Invocation staring with 1.0.12


In my package I’m creating synthetic events that I dispatch to my packages internal event handling system. I’m creating them like this:

syntheticEvent = Object.create originalEvent,
  currentTarget: get: -> currentTarget
  preventDefault: value: ->
  stopPropagation: value: ->
    propagationStopped = true
  stopImmediatePropagation: value: ->
    propagationStopped = true
    immediatePropagationStopped = true

This was working well as of 1.0.11, but broke in 1.0.12, I expect as a result of updating Chrome or io.js. The problem is that now when I make a call on the synthetic event, such as I get an “Illegal Invocation” exception.

Does anyone know why this is or what I might do to work around the issue?



Think I’m on my way to a solution on this. Apparently Chrome 43 no longer allows for using Object.create with event objects. Looks like command-registery (I think where I got my original pattern) had to change there implementation too I’ll try the same thing.