Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit 60470a7

Browse files
committed
Added known issue with document.currentScript
Text is almost literally from http://webcomponents.org/polyfills/html-imports/
1 parent 8fd7a6c commit 60470a7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ window.addEventListener('WebComponentsReady', function(e) {
9696
* [Contenteditable elements do not trigger MutationObserver](#contentedit)
9797
* [ShadowCSS: :host-context(...):host(...) doesn't work](#hostcontext)
9898
* [ShadowCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work](#nestedparens)
99+
* [HTML imports: document.currentScript doesn't work as expected](#currentscript)
99100
* [execCommand isn't supported under Shadow DOM](#execcommand)
100101

101102
### Limited CSS encapsulation <a id="encapsulation"></a>
@@ -145,6 +146,9 @@ polyfill-next-selector { content: '.foo :host.bar, :host.foo.bar'; }
145146
### ShadowCSS: :host(.zot:not(.bar:nth-child(2))) doesn't work <a id="nestedparens"></a>
146147
ShadowCSS `:host()` rules can only have (at most) 1-level of nested parentheses in its argument selector under ShadowCSS. For example, `:host(.zot)` and `:host(.zot:not(.bar))` both work, but `:host(.zot:not(.bar:nth-child(2)))` does not.
147148

149+
### HTML imports: document.currentScript doesn't work as expected <a id="currentscript"></a>
150+
In native HTML Imports, document.currentScript.ownerDocument references the import document itself. In the polyfill use document._currentScript.ownerDocument (note the underscore).
151+
148152
### execCommand and contenteditable isn't supported under Shadow DOM <a id="execcommand"></a>
149153
See [#212](https://github.com/webcomponents/webcomponentsjs/issues/212)
150154

0 commit comments

Comments
 (0)