-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(synthetic-shadow): synthetic shadow doesn't preserve assignedSlot…
… behavior (#2547) * fix(synthetic-shadow): synthetic shadow doesn't preserve assignedSlot behavio Fixes #2377 W-9492998 * fix: add bug repro as a new test * fix: minor change and disable test for ie11 * fix: use existing method to check for native shadow root * fix: use shadow root getter instead of dot-notation * fix: add a new test for assignedSlot returns null for default content in light dom
- Loading branch information
1 parent
656663a
commit caa3c72
Showing
11 changed files
with
363 additions
and
315 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (c) 2021, salesforce.com, inc. | ||
* All rights reserved. | ||
* SPDX-License-Identifier: MIT | ||
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT | ||
*/ | ||
|
||
import { hasOwnProperty, getOwnPropertyDescriptor } from '@lwc/shared'; | ||
|
||
export const assignedSlotGetter: (this: Text) => HTMLSlotElement | null = hasOwnProperty.call( | ||
Text.prototype, | ||
'assignedSlot' | ||
) | ||
? getOwnPropertyDescriptor(Text.prototype, 'assignedSlot')!.get! | ||
: () => null; |
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
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
Oops, something went wrong.