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

Function EventManager

docs/tests/v2/es6/js/sanddance.js:54922–54936  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54920
54921var EventManager = function () {
54922 function EventManager() {
54923 var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
54924 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
54925 (0, _classCallCheck2.default)(this, EventManager);
54926 this.options = Object.assign({}, DEFAULT_OPTIONS, options);
54927 this.events = new Map();
54928 this._onBasicInput = this._onBasicInput.bind(this);
54929 this._onOtherEvent = this._onOtherEvent.bind(this);
54930 this.setElement(element);
54931 var events = options.events;
54932
54933 if (events) {
54934 this.on(events);
54935 }
54936 }
54937
54938 (0, _createClass2.default)(EventManager, [{
54939 key: "setElement",

Callers

nothing calls this directly

Calls 2

setElementMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected