-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: escape hatch for async event target accessor (#1510)
* fix: escape hatch for async event target accessor When event's original target is from a non-keyed node, do not retarget event when accessed asynchronously
- Loading branch information
1 parent
044077f
commit 1e55195
Showing
6 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
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
4 changes: 4 additions & 0 deletions
4
...test/shadow-dom/Event-properties/x/childWithOutLwcDomManual/childWithOutLwcDomManual.html
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<template> | ||
<div> | ||
</div> | ||
</template> |
8 changes: 8 additions & 0 deletions
8
...a/test/shadow-dom/Event-properties/x/childWithOutLwcDomManual/childWithOutLwcDomManual.js
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class Child extends LightningElement { | ||
renderedCallback() { | ||
const container = this.template.querySelector('div'); | ||
container.appendChild(document.createElement('span')); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...rma/test/shadow-dom/Event-properties/x/parentWithDynamicChild/parentWithDynamicChild.html
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div onclick={clickHandler}> | ||
<x-child-with-out-lwc-dom-manual></x-child-with-out-lwc-dom-manual> | ||
</div> | ||
</template> |
10 changes: 10 additions & 0 deletions
10
...karma/test/shadow-dom/Event-properties/x/parentWithDynamicChild/parentWithDynamicChild.js
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { LightningElement, api } from 'lwc'; | ||
|
||
export default class ParentWithDynamicChild extends LightningElement { | ||
@api | ||
eventListener; | ||
|
||
clickHandler(evt) { | ||
return this.eventListener && this.eventListener(evt); | ||
} | ||
} |