@whitesev/utils 2.1.4 → 2.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -5033,7 +5033,7 @@
5033
5033
  });
5034
5034
  return result;
5035
5035
  }
5036
- listenKeyboard(target, eventName = "keypress", callback) {
5036
+ listenKeyboard(target, eventName = "keypress", callback, options) {
5037
5037
  if (typeof target !== "object" ||
5038
5038
  (typeof target["addEventListener"] !== "function" &&
5039
5039
  typeof target["removeEventListener"] !== "function")) {
@@ -5059,7 +5059,7 @@
5059
5059
  callback(keyName, keyValue.toString(), otherCodeList, event);
5060
5060
  }
5061
5061
  };
5062
- target.addEventListener(eventName, keyEvent);
5062
+ target.addEventListener(eventName, keyEvent, options);
5063
5063
  return {
5064
5064
  removeListen() {
5065
5065
  target.removeEventListener(eventName, keyEvent);