MCPcopy Index your code
hub / github.com/microsoft/SandDance / initializeEventConfig

Function initializeEventConfig

docs/app/js/sanddance-app.js:141831–141850  ·  view source on GitHub ↗

* Initialize event handling configuration. * @param {object} config - The configuration settings. * @return {object}

(config)

Source from the content-addressed store, hash-verified

141829 * @param {object} config - The configuration settings.
141830 * @return {object}
141831 */ function initializeEventConfig(config) {
141832 const events1 = (0, _vegaUtil.extend)({
141833 defaults: {}
141834 }, config);
141835 const unpack = (obj, keys)=>{
141836 keys.forEach((k)=>{
141837 if ((0, _vegaUtil.isArray)(obj[k])) obj[k] = (0, _vegaUtil.toSet)(obj[k]);
141838 });
141839 };
141840 unpack(events1.defaults, [
141841 "prevent",
141842 "allow"
141843 ]);
141844 unpack(events1, [
141845 "view",
141846 "window",
141847 "selector"
141848 ]);
141849 return events1;
141850}
141851function trackEventListener(view, sources, type, handler) {
141852 view._eventListeners.push({
141853 type: type,

Callers 1

ViewFunction · 0.70

Calls 1

unpackFunction · 0.70

Tested by

no test coverage detected