This repository has been archived by the owner on Sep 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Adds attachShadow({shadyUpgradeFragment: documentFragment})
#316
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
6261855
Adds `ShadowRoot.upgrade(fragment, host, options)`
71f9768
[upgrade] Fix rendering with slots
96be5a4
Avoid childNodes when possible.
3091902
More avoiding of `childNodes` when possible.
3da0f04
Remove superfluous check
eb98d72
[upgrade] Refine argument name
a0ce84a
Merge branch 'more-flush' into shadowRoot-upgrade
f542a57
Merge branch 'master' into shadowRoot-upgrade
a67d835
Merge branch 'master' into shadowRoot-upgrade
d359957
Adds `ShadyDOM.upgrade(fragment, host, options)`
4342887
Re-add skipped tests
003a148
upgarde: avoid optimal path when customElements polyfill is in use
2b355c2
Avoid `upgrade` on IE
59cff79
Address review feedback
87c8e35
Slight simplification based on review
f70e34e
Allow `ShadyDOM.attachDOM` to work in the customElements polyfill
ba1a238
Merge branch 'master' into shadowRoot-upgrade
4eb1c12
Merge branch 'wrap-className' into shadowRoot-upgrade
3fb6f83
Merge branch 'master' into shadowRoot-upgrade
9fa8f8a
Ensure scoping updates correctly when ShadyDOM.attachDom is used.
5d9f909
Fix event removal for platforms (e.g. old Chrome) that don't have eve…
9dd608d
Simplify native patching slightly and add className
eb6e08a
Remove `ShadyDOM.attachDom` in favor of `attachShadow({shadyUpgradeFr…
d585fd4
Fix typo
5a77147
Lint fix.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -440,7 +440,7 @@ export function addEventListener(type, fnOrObj, optionsOrCapture) { | |
const wrapperFn = function(e) { | ||
// Support `once` option. | ||
if (once) { | ||
this[utils.SHADY_PREFIX + 'removeEventListener'](type, fnOrObj, nativeEventOptions); | ||
this[utils.SHADY_PREFIX + 'removeEventListener'](type, fnOrObj, optionsOrCapture); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not following this change... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
} | ||
if (!e['__target']) { | ||
patchEvent(e); | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're keeping this change, let's add a comment for why... did something else patch the instance rather than the prototype?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, ShadyCSS patches this directly. Changing is path of least resistance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could change this though, correct? https://github.com/webcomponents/shadycss/blob/f377017e50f4d472a57ac224973f88b63a92f17e/src/style-placeholder.js#L54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "fast" (tearoff) native shim also patches the instance. So nevermind, let's just align on instance patching for now.