@whitesev/utils 1.4.2 → 1.4.3

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.cjs.js CHANGED
@@ -3059,7 +3059,7 @@ class Utils {
3059
3059
  UtilsCore.init(option);
3060
3060
  }
3061
3061
  /** 版本号 */
3062
- version = "2024.6.10";
3062
+ version = "2024.6.11";
3063
3063
  addStyle(cssText) {
3064
3064
  if (typeof cssText !== "string") {
3065
3065
  throw new Error("Utils.addStyle 参数cssText 必须为String类型");
@@ -4658,6 +4658,7 @@ class Utils {
4658
4658
  */
4659
4659
  characterDataOldValue: void 0,
4660
4660
  },
4661
+ immediate: false,
4661
4662
  };
4662
4663
  observer_config = UtilsContext.assign(default_obverser_config, observer_config);
4663
4664
  let windowMutationObserver = window.MutationObserver ||
@@ -4686,6 +4687,10 @@ class Utils {
4686
4687
  /* 未知 */
4687
4688
  console.error("Utils.mutationObserver 未知参数", arguments);
4688
4689
  }
4690
+ if (observer_config.immediate) {
4691
+ /* 主动触发一次 */
4692
+ observer_config.callback([], mutationObserver);
4693
+ }
4689
4694
  return mutationObserver;
4690
4695
  }
4691
4696
  /**