@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.esm.js CHANGED
@@ -5027,7 +5027,7 @@ class Utils {
5027
5027
  });
5028
5028
  return result;
5029
5029
  }
5030
- listenKeyboard(target, eventName = "keypress", callback) {
5030
+ listenKeyboard(target, eventName = "keypress", callback, options) {
5031
5031
  if (typeof target !== "object" ||
5032
5032
  (typeof target["addEventListener"] !== "function" &&
5033
5033
  typeof target["removeEventListener"] !== "function")) {
@@ -5053,7 +5053,7 @@ class Utils {
5053
5053
  callback(keyName, keyValue.toString(), otherCodeList, event);
5054
5054
  }
5055
5055
  };
5056
- target.addEventListener(eventName, keyEvent);
5056
+ target.addEventListener(eventName, keyEvent, options);
5057
5057
  return {
5058
5058
  removeListen() {
5059
5059
  target.removeEventListener(eventName, keyEvent);