util-helpers 5.3.0 → 5.3.1

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.
@@ -1789,7 +1789,7 @@
1789
1789
  }
1790
1790
 
1791
1791
  function injectStyle(css, options) {
1792
- var _a = options || {}, _b = _a.container, container = _b === void 0 ? document.head || document.getElementsByTagName('head')[0] || document.body : _b, _c = _a.insertAt, insertAt = _c === void 0 ? 'top' : _c;
1792
+ var _a = options || {}, _b = _a.container, container = _b === void 0 ? document.head || document.getElementsByTagName('head')[0] || document.body : _b, _c = _a.insertAt, insertAt = _c === void 0 ? 'top' : _c, onBefore = _a.onBefore;
1793
1793
  var style = document.createElement('style');
1794
1794
  if (style.styleSheet) {
1795
1795
  style.styleSheet.cssText = css;
@@ -1797,6 +1797,9 @@
1797
1797
  else {
1798
1798
  style.appendChild(document.createTextNode(css));
1799
1799
  }
1800
+ if (typeof onBefore === 'function') {
1801
+ onBefore(style);
1802
+ }
1800
1803
  var atTop = insertAt === 'top';
1801
1804
  if (atTop && container.prepend) {
1802
1805
  container.prepend(style);
@@ -2151,7 +2154,7 @@
2151
2154
  return internalFindTreeSelect(tree, predicate, childrenField);
2152
2155
  }
2153
2156
 
2154
- var VERSION = "5.3.0";
2157
+ var VERSION = "5.3.1";
2155
2158
 
2156
2159
  /**
2157
2160
  * 事件触发器,支持浏览器端和 node 端。