-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(engine): dom patching #688
feat(engine): dom patching #688
Conversation
@davidturissini @caridy Locker relies on the unwrap() api to detect nodes created by lwc. Removing traverse-membrane before W-5143776 is done will break our tests. |
This is actually way simpler than I thought it will be. What about |
@@ -32,7 +34,7 @@ let TextNodeProto: object; | |||
// to patch text nodes generated by a template. | |||
export function patchTextNodeProto(text: Text) { | |||
if (isUndefined(TextNodeProto)) { | |||
TextNodeProto = getPrototypeOf(text); | |||
TextNodeProto = create(getPrototypeOf(text), NodePatchDescriptors); |
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.
What about doing this during the library initialization to avoid the branching at runtime?
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 move this to library initialization, we will be creating this object even when native shadow is supported
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.
I'm fine with this approach.
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.
This code should also be used in patchCommentNodeProto
, maybe abstract it since it is the same for both type of nodes.
} | ||
// traverse membrane is not that important, it goes second | ||
unwrapped = getRawNode(value); | ||
const unwrapped = reactiveMembrane.unwrapProxy(value); |
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.
This is beautiful!
@@ -40,7 +39,7 @@ const EventPatchDescriptors: PropertyDescriptorMap = { | |||
// event is already beyond the boundaries of our controlled shadow roots | |||
return currentTarget; | |||
} | |||
return patchShadowDomTraversalMethods(currentTarget as Element); | |||
return currentTarget as Element; |
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.
Let's remove the above branch since it's not needed anymore. By the way, do we even need to patch the currentTarget
since the code can be simplified to only invoke the original getter.
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.
nope
341434b
to
6abb9e3
Compare
Benchmark resultsBase commit: lwc-engine-benchmark-ie11
|
Benchmark resultsBase commit: lwc-engine-benchmark-ie11
|
@@ -31,6 +35,11 @@ const CustomElementPatchDescriptors: PropertyDescriptorMap = { | |||
configurable: true, | |||
enumerable: true, | |||
}, | |||
shadowRoot: { | |||
value: getShadowRootPatchedValue, |
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.
this should be a getter instead.
@@ -33,18 +32,6 @@ const eventCurrentTargetGetter: (this: Event) => Element | null = getOwnProperty | |||
const GET_ROOT_NODE_CONFIG_FALSE = { composed: false }; | |||
|
|||
const EventPatchDescriptors: PropertyDescriptorMap = { | |||
currentTarget: { |
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.
very nice!
@@ -230,12 +225,6 @@ export function getFilteredChildNodes(node: Node): Element[] { | |||
} | |||
|
|||
function lightDomChildNodesGetter(this: HTMLElement): Node[] { | |||
if (process.env.NODE_ENV !== 'production') { |
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.
any reason for this to be removed?
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.
restrictions was already logging a warning for childNodes, so this was redundant
@@ -181,14 +181,14 @@ describe('api', () => { | |||
const elm = createElement('x-foo', { is: Foo }); | |||
document.body.appendChild(elm); | |||
// TODO: once we switch to shadow DOM this test will have to be adjusted | |||
expect(elm.textContent).toEqual('miami'); | |||
expect(getHostShadowRoot(elm).querySelector('span').textContent).toEqual('miami'); |
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.
why not using elm.shadowRoot.querySelector
?
@@ -78,7 +78,6 @@ export const createCustomElmHook = (vnode: VCustomElement) => { | |||
} | |||
setNodeOwnerKey(elm, uid); | |||
const def = getComponentDef(ctor); | |||
setElementProto(elm, def); |
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.
this can't be removed @davidturissini
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.
This already happens in patchCustomElementProto
, which is called on line 82
|
||
function valueDistortion(value: any) { | ||
if (process.env.NODE_ENV !== 'production') { |
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.
beautiful
@@ -84,7 +84,7 @@ export function createElement(sel: string, options: any = {}): HTMLElement { | |||
const def = getComponentDef(Ctor); | |||
setElementProto(element, def); | |||
if (isTrue(fallback)) { | |||
patchCustomElementProto(element, sel, def); | |||
patchCustomElement(element); |
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.
why?
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.
Yea, this is incorrect based on our conversation yesterday
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.
still have few questions
descriptors = SlotPatchDescriptors; | ||
break; | ||
case 'IFRAME': | ||
descriptors = IframeDescriptors; |
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.
Why do we need a different descriptor for iframe? Since we don't wrap it in a Proxy, it should behave like another element right?
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.
you're probably right! The special one was before of the proxy on the first place.
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 have a customer complaining because of this, that's why I thought about it. =)
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.
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.
ah! bad memory! that's true, it is compat, it transforms the property accessor on iframes. In that case, we should probably extend the list of properties, maybe detecting available properties from the instance rather than a whitelist.
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.
I'm not sure what you mean here
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.
I'm saying that you're correct, it is because of compat. I'm also saying that the patched descriptors are static today, and they might depend on what the iframe obj is returning rather than being static.
Benchmark resultsBase commit: |
@@ -36,7 +36,7 @@ const CustomElementPatchDescriptors: PropertyDescriptorMap = { | |||
enumerable: true, | |||
}, | |||
shadowRoot: { | |||
value: getShadowRootPatchedValue, | |||
get: getShadowRootPatchedValue, |
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 it is a getter, it should be called *Getter
instead of *Value
Benchmark resultsBase commit: |
Benchmark resultsBase commit: |
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.
minor changes to optimize the code a little bit more.
Benchmark resultsBase commit: |
Benchmark resultsBase commit: |
@@ -133,6 +134,10 @@ function getFirstMatch(owner: HTMLElement, nodeList: NodeList): Element | null { | |||
return null; | |||
} | |||
|
|||
export function shadowDomElementFromPoint(host: HTMLElement, left: number, top: number) { |
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.
missing return annotation.
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.
let's roll!
Benchmark resultsBase commit: |
Benchmark resultsBase commit: |
Benchmark resultsBase commit: |
* feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix
* refactor(engine): removal of is attr and forceTagName refactor(engine): removal of is attr and forceTagName fix(engine): removing integration test for forceTagName refactor(engine): snabbdom lite - phase 1 refactor(engine): adding hooks.ts refactor(engine): removing global hooks refactor(engine): PR 606 refactor(engine): splitting style and class modules into static and dynamic test(engine): ready for the final push refactor(engine): making hooks mandatory. refactor(engine): making all hooks functions refactor(engine): dynamic diff vs static diff refactor(engine): using two diff algos refactor(engine): removing htmlapi in favor of pure patching fix(engine): missing argument when determining diff algo fix(engine): adding tests for dynamic diff fix(engine): clean up fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test
refactor(engine): removal of is attr and forceTagName fix(engine): removing integration test for forceTagName fix: remove custom element transformation from CSS (#695) fix(compiler): fixing fixtures refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName refactor(engine): removal of is attr and forceTagName fix(engine): removing integration test for forceTagName refactor(engine): snabbdom lite - phase 1 refactor(engine): adding hooks.ts refactor(engine): removing global hooks refactor(engine): PR 606 refactor(engine): splitting style and class modules into static and dynamic test(engine): ready for the final push refactor(engine): making hooks mandatory. refactor(engine): making all hooks functions refactor(engine): dynamic diff vs static diff refactor(engine): using two diff algos refactor(engine): removing htmlapi in favor of pure patching fix(engine): missing argument when determining diff algo fix(engine): adding tests for dynamic diff fix(engine): clean up fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test
refactor(engine): removal of is attr and forceTagName fix(engine): removing integration test for forceTagName fix: remove custom element transformation from CSS (#695) fix(compiler): fixing fixtures refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName refactor(engine): removal of is attr and forceTagName fix(engine): removing integration test for forceTagName refactor(engine): snabbdom lite - phase 1 refactor(engine): adding hooks.ts refactor(engine): removing global hooks refactor(engine): PR 606 refactor(engine): splitting style and class modules into static and dynamic test(engine): ready for the final push refactor(engine): making hooks mandatory. refactor(engine): making all hooks functions refactor(engine): dynamic diff vs static diff refactor(engine): using two diff algos refactor(engine): removing htmlapi in favor of pure patching fix(engine): missing argument when determining diff algo fix(engine): adding tests for dynamic diff fix(engine): clean up fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles
* * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test wip: styles still broken wip: fix styles * refactor(engine): preliminar work for tabindex * feat(engine): prototype over descriptors * refactor(engine): preliminar work for focus and blur patch * fix(engine): invalid import statement * refactor(engine): preliminar work for focus and blur patch * fix(engine): make shadowroot a fragment * fix(engine): make shadowroot a fragment * fix(engine): make shadowroot a fragment * fix(engine): make shadowroot a fragment * feat(engine): active element for shadow roots (#740) * feat(engine): active element for shadow roots * fix(engine): linting * fix(docs): updated readme * fix(engine): types * fix(engine): nodelist iterator * fix(engine): nodelist iterator * chore(engine): rebasing next-rebased * refactor(engine): implement delegatesFocus flag * test(engine): implement delegatesFocus flag tests * chore(engine): fixing dval mess with the history * fix: newlines on tests * feat: add some polyfill tests * fix(engine): tests * fix(engine): review for PR 747
* refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * fix: remove custom element transformation from CSS (#695) * fix(compiler): fixing fixtures * refactor(engine): snabbdom lite - phase 1 (#606) * refactor(engine): removal of is attr and forceTagName * refactor(engine): removal of is attr and forceTagName * fix(engine): removing integration test for forceTagName * refactor(engine): snabbdom lite - phase 1 * refactor(engine): adding hooks.ts * refactor(engine): removing global hooks * refactor(engine): splitting style and class modules into static and dynamic * test(engine): ready for the final push * refactor(engine): making hooks mandatory. * refactor(engine): making all hooks functions * refactor(engine): dynamic diff vs static diff * refactor(engine): using two diff algos * refactor(engine): removing htmlapi in favor of pure patching * fix(engine): missing argument when determining diff algo * fix(engine): adding tests for dynamic diff * fix(engine): clean up * fix(engine): integration test failures * refactor(engine): proto chaining * fix(engine): wrong auto import * fix(engine): correcting the proto chain * refactor(engine): implementing the base element proto chain * test(engine): adding more tests for restrictions on elements * refactor(engine): rename to BaseBridgeElement * feat(engine): dom patching (#688) * feat(engine): dom patching * fix(engine): cleanup descriptors * feat(engine): rebase * fix(engine): linting * fix(engine): pr feedback * fix(engine): lint * fix(compiler): updated snapshot testing to account for shadow dom * fix(engine): pr feedback * fix(engine): fixing restrictions on custom elements * fix(engine): exposing host (#705) * fix(engine): exposing host * fix(engine): shadow root * wip(engine): linting and type errors * fix(engine): cleaning up shadow root detection * fix(engine): removing restrictions test * fix(engine): fixing element from point methods * fix(engine): disabling some attribute integration test for now * fix(engine): linting * fix(engine): upgrade ie11 driver * fix(engine): compat test fix * fix(engine): applying elementFromPoint on document * fix(engine): linting * fix(engine): reverting unnecessary changes * fix(engine): removing skip in test * fix(engine): polyfill readmes * fix(engine): review feedback * fix(engine): integration tests for elementFromPoint * fix(engine): ie11 elementsFromPoint * fix(engine): feedback * fix(engine): ts fix * wip: yarn update * fix(engine): fixing snapshot test
Details
Removing traversal membrane. Patching dom prototype methods instead.
Does this PR introduce a breaking change?
If yes, please describe the impact and migration path for existing applications:
Please check if your PR fulfills the following requirements:
Shadow methods and properties are no longer lazy loaded, which means that there are no shadow escape hatches for external libraries.