MCPcopy Create free account
hub / github.com/microsoft/SandDance / processElementEvent

Function processElementEvent

docs/app/js/sanddance-app.js:21267–21284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21265 events[eventName].count++;
21266 if (EventGroup1._isElement(target)) {
21267 var processElementEvent = function() {
21268 var args = [];
21269 for(var _i = 0; _i < arguments.length; _i++)args[_i] = arguments[_i];
21270 if (_this._isDisposed) return;
21271 var result;
21272 try {
21273 result = callback.apply(parent_1, args);
21274 if (result === false && args[0]) {
21275 var e = args[0];
21276 if (e.preventDefault) e.preventDefault();
21277 if (e.stopPropagation) e.stopPropagation();
21278 e.cancelBubble = true;
21279 }
21280 } catch (e) {
21281 // ignore
21282 }
21283 return result;
21284 };
21285 eventRecord.elementCallback = processElementEvent;
21286 if (target.addEventListener) target.addEventListener(eventName, processElementEvent, options);
21287 else if (target.attachEvent) // IE8

Callers

nothing calls this directly

Calls 1

stopPropagationMethod · 0.45

Tested by

no test coverage detected