(node, type, params)
| 2458 | } |
| 2459 | |
| 2460 | function dispatchEvent(node, type, params) { |
| 2461 | var window = defaultView(node), |
| 2462 | event = window.CustomEvent; |
| 2463 | |
| 2464 | if (typeof event === "function") { |
| 2465 | event = new event(type, params); |
| 2466 | } else { |
| 2467 | event = window.document.createEvent("Event"); |
| 2468 | if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; |
| 2469 | else event.initEvent(type, false, false); |
| 2470 | } |
| 2471 | |
| 2472 | node.dispatchEvent(event); |
| 2473 | } |
| 2474 | |
| 2475 | function dispatchConstant(type, params) { |
| 2476 | return function() { |
no test coverage detected