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

Function initializeEventConfig

docs/tests/v3/es6/js/sanddance-test-es6.js:89762–89781  ·  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

89760 * @param {object} config - The configuration settings.
89761 * @return {object}
89762 */ function initializeEventConfig(config) {
89763 const events1 = (0, _vegaUtil.extend)({
89764 defaults: {}
89765 }, config);
89766 const unpack = (obj, keys)=>{
89767 keys.forEach((k)=>{
89768 if ((0, _vegaUtil.isArray)(obj[k])) obj[k] = (0, _vegaUtil.toSet)(obj[k]);
89769 });
89770 };
89771 unpack(events1.defaults, [
89772 "prevent",
89773 "allow"
89774 ]);
89775 unpack(events1, [
89776 "view",
89777 "window",
89778 "selector"
89779 ]);
89780 return events1;
89781}
89782function trackEventListener(view, sources, type, handler) {
89783 view._eventListeners.push({
89784 type: type,

Callers 1

ViewFunction · 0.70

Calls 1

unpackFunction · 0.70

Tested by

no test coverage detected