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

Function initializeHandler

docs/app/js/sanddance-app.js:142170–142177  ·  view source on GitHub ↗
(view, prevHandler, el, constructor)

Source from the content-addressed store, hash-verified

142168 };
142169}
142170function initializeHandler(view, prevHandler, el, constructor) {
142171 // instantiate scenegraph handler
142172 const handler = new constructor(view.loader(), trap(view, view.tooltip())).scene(view.scenegraph().root).initialize(el, offset(view), view); // transfer event handlers
142173 if (prevHandler) prevHandler.handlers().forEach((h)=>{
142174 handler.on(h.type, h.handler);
142175 });
142176 return handler;
142177}
142178function initialize(el, elBind) {
142179 const view = this, type = view._renderType, config = view._eventConfig.bind, module = (0, _vegaScenegraph.renderModule)(type); // containing dom element
142180 el = view._el = el ? lookup(view, el, true) : null; // initialize aria attributes

Callers 1

initializeFunction · 0.70

Calls 5

trapFunction · 0.70
offsetFunction · 0.70
initializeMethod · 0.65
forEachMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected