window.fireEvent and window.dispatchEvent are both undefined in IE8

I've just discovered that both window.fireEvent and window.dispatchEvent are undefined in IE8, however document.fireEvent exists.

So how on earth do I trigger events for the window element in IE8?...


It's impossible. The way jQuery etc does this is by virtually emitting events within jQuery, rather than using the native event emitting.

链接地址: http://www.djcxy.com/p/51838.html

上一篇: SMS文本中的自定义方案

下一篇: window.fireEvent和window.dispatchEvent在IE8中都未定义