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

Function wrapEvent

docs/tests/v2/es6/js/sanddance.js:34838–34846  ·  view source on GitHub ↗
(listener)

Source from the content-addressed store, hash-verified

34836 }(canvas.getContext);
34837
34838 function wrapEvent(listener) {
34839 if (typeof(listener) == "function") {
34840 return listener;
34841 } else {
34842 return function(info) {
34843 listener.handleEvent(info);
34844 }
34845 }
34846 }
34847
34848 var addOnContextLostListener = function(listener) {
34849 onLost_.push(wrapEvent(listener));

Callers 2

addOnContextLostListenerFunction · 0.85

Calls 1

handleEventMethod · 0.45

Tested by

no test coverage detected