-
Notifications
You must be signed in to change notification settings - Fork 29k
Another approach to bootstrap Angular under a shadow root #67947
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
cc623aa
refactor(core): move `SharedStylesHost` interface into `@angular/core…
dgp1130 003f198
refactor(core): add `getRootNode` to `RNode` interface
dgp1130 8ff9efd
refactor(core): don't duplicate styles when adding the same host mult…
dgp1130 b2ad786
feat(core): support bootstrapping Angular applications underneath sha…
dgp1130 e4bbecc
test(platform-browser): verify that Angular supports bootstrapping un…
dgp1130 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
This file contains hidden or 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 |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| { | ||
| "dist/browser/main-[hash].js": 240329, | ||
| "dist/browser/main-[hash].js": 240750, | ||
| "dist/browser/polyfills-[hash].js": 35726, | ||
| "dist/browser/event-dispatch-contract.min.js": 476 | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "dist/main.js": 89237, | ||
| "dist/main.js": 93814, | ||
| "dist/polyfills.js": 35677 | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
47 changes: 47 additions & 0 deletions
47
packages/core/src/render3/interfaces/shared_styles_host.ts
This file contains hidden or 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,47 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.dev/license | ||
| */ | ||
|
|
||
| import {InjectionToken} from '../../di/injection_token'; | ||
|
|
||
| /** Token used to retrieve the `SharedStylesHost`. */ | ||
| export const SHARED_STYLES_HOST = new InjectionToken<SharedStylesHost>( | ||
| typeof ngDevMode !== 'undefined' && ngDevMode ? 'SHARED_STYLES_HOST' : '', | ||
| ); | ||
|
|
||
| /** Manages stylesheets for components in the application. */ | ||
| export interface SharedStylesHost { | ||
| /** | ||
| * Adds embedded styles to the DOM via HTML `style` elements. | ||
| * @param styles An array of style content strings. | ||
| * @param urls An array of URLs to be added as link tags. | ||
| */ | ||
| addStyles(styles: string[], urls?: string[]): void; | ||
|
|
||
| /** | ||
| * Removes embedded styles from the DOM that were added as HTML `style` elements. | ||
| * @param styles An array of style content strings. | ||
| * @param urls An array of URLs to be removed as link tags. | ||
| */ | ||
| removeStyles(styles: string[], urls?: string[]): void; | ||
|
|
||
| /** | ||
| * Adds a host node to contain styles added to the DOM and adds all existing style usage to | ||
| * the newly added host node. | ||
| * | ||
| * @param hostNode The node to contain styles added to the DOM. | ||
| */ | ||
| addHost(hostNode: Node): void; | ||
|
|
||
| /** | ||
| * Removes a host node from the set of style hosts and removes all existing style usage from | ||
| * the removed host node. | ||
| * | ||
| * @param hostNode The node to remove from the set of style hosts. | ||
| */ | ||
| removeHost(hostNode: Node): void; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.