MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / sendEvent

Function sendEvent

public/iframe/lib/js/echarts-wordcloud.js:1115–1129  ·  view source on GitHub ↗
(type, cancelable, detail)

Source from the content-addressed store, hash-verified

1113 /* Send DOM event to all elements. Will stop sending event and return
1114 if the previous one is canceled (for cancelable events). */
1115 var sendEvent = function sendEvent(type, cancelable, detail) {
1116 if (cancelable) {
1117 return !elements.some(function(el) {
1118 var evt = document.createEvent('CustomEvent');
1119 evt.initCustomEvent(type, true, cancelable, detail || {});
1120 return !el.dispatchEvent(evt);
1121 }, this);
1122 } else {
1123 elements.forEach(function(el) {
1124 var evt = document.createEvent('CustomEvent');
1125 evt.initCustomEvent(type, true, cancelable, detail || {});
1126 el.dispatchEvent(evt);
1127 }, this);
1128 }
1129 };
1130
1131 /* Start drawing on a canvas */
1132 var start = function start() {

Callers 1

startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected