@whitesev/domutils 1.4.4 → 1.4.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.
@@ -288,11 +288,15 @@ System.register('DOMUtils', [], (function (exports) {
288
288
  let $closestMatches = eventTarget.closest(selectorItem);
289
289
  if ($closestMatches && totalParent.contains($closestMatches)) {
290
290
  /* event的target值不能直接修改 */
291
- OriginPrototype.Object.defineProperty(event, "target", {
292
- get() {
293
- return $closestMatches;
294
- },
295
- });
291
+ // 这里尝试使用defineProperty修改eventtarget
292
+ try {
293
+ OriginPrototype.Object.defineProperty(event, "target", {
294
+ get() {
295
+ return $closestMatches;
296
+ },
297
+ });
298
+ }
299
+ catch (error) { }
296
300
  listenerCallBack.call($closestMatches, event);
297
301
  checkOptionOnceToRemoveEventListener();
298
302
  break;
@@ -1033,7 +1037,7 @@ System.register('DOMUtils', [], (function (exports) {
1033
1037
  super(option);
1034
1038
  }
1035
1039
  /** 版本号 */
1036
- version = "2024.12.3";
1040
+ version = "2024.12.4";
1037
1041
  attr(element, attrName, attrValue) {
1038
1042
  let DOMUtilsContext = this;
1039
1043
  if (typeof element === "string") {