@shgysk8zer0/polyfills 0.4.5 → 0.4.7

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/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [v0.4.7] - 2024-11-06
11
+
12
+ ### Changed
13
+ - Update `@aegisjsproject/sanitizer` with support for Declarative Shadow DOM
14
+
15
+ ## [v0.4.6] - 2024-11-03
16
+
17
+ ### Added
18
+ - Add [`CloseWatcher`](https://developer.mozilla.org/en-US/docs/Web/API/CloseWatcher) polyfill
19
+
20
+ ### Changed
21
+ - Enhance `setHTMLUnsafe` and `getHTML` support
22
+
10
23
  ## [v0.4.5] - 2024-10-11
11
24
 
12
25
  ### Added
package/ShadowRoot.js CHANGED
@@ -1,23 +1,9 @@
1
1
  import { polyfillGetterSetter, polyfillMethod } from './utils.js';
2
2
  import { adoptedStyleSheets } from './assets/adoptedStylesheets.js';
3
- import { setHTMLUnsafe } from './methods/dom.js';
3
+ import { getHTML, setHTMLUnsafe } from './methods/dom.js';
4
4
 
5
5
  if ('ShadowRoot' in globalThis) {
6
6
  polyfillGetterSetter(ShadowRoot.prototype, 'adoptedStyleSheets', adoptedStyleSheets);
7
7
  polyfillMethod(ShadowRoot.prototype, 'setHTMLUnsafe', setHTMLUnsafe);
8
-
9
- polyfillMethod(ShadowRoot.prototype, 'getHTML', function ({ shadowRoots, serializableShadowRoots = false } = {}) {
10
- const clone = this.cloneNode(true);
11
-
12
- if (serializableShadowRoots) {
13
- //
14
- }
15
-
16
- if (Array.isArray(shadowRoots)) {
17
- //
18
- }
19
-
20
- return clone.innerHTML;
21
- });
22
-
8
+ polyfillMethod(ShadowRoot.prototype, 'getHTML', getHTML);
23
9
  }