feat(core): remove ViewEncapsulation.Native (#38882)
Removes `ViewEncapsulation.Native` which has been deprecated for several major versions. BREAKING CHANGES: * `ViewEncapsulation.Native` has been removed. Use `ViewEncapsulation.ShadowDom` instead. Existing usages will be updated automatically by `ng update`. PR Close #38882
This commit is contained in:

committed by
atscott

parent
0e733f3689
commit
4a1c12c773
@ -173,7 +173,7 @@ export interface R3FactoryDefMetadataFacade {
|
||||
|
||||
export enum ViewEncapsulation {
|
||||
Emulated = 0,
|
||||
Native = 1,
|
||||
// Historically the 1 value was for `Native` encapsulation which has been removed as of v11.
|
||||
None = 2,
|
||||
ShadowDom = 3
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ export interface Component extends Directive {
|
||||
}
|
||||
export enum ViewEncapsulation {
|
||||
Emulated = 0,
|
||||
Native = 1,
|
||||
// Historically the 1 value was for `Native` encapsulation which has been removed as of v11.
|
||||
None = 2,
|
||||
ShadowDom = 3
|
||||
}
|
||||
|
@ -163,8 +163,6 @@ export interface R3ComponentMetadata extends R3DirectiveMetadata {
|
||||
|
||||
/**
|
||||
* An encapsulation policy for the template and CSS styles. One of:
|
||||
* - `ViewEncapsulation.Native`: Use shadow roots. This works only if natively available on the
|
||||
* platform (note that this is marked the as the "deprecated shadow DOM" as of Angular v6.1.
|
||||
* - `ViewEncapsulation.Emulated`: Use shimmed CSS that emulates the native behavior.
|
||||
* - `ViewEncapsulation.None`: Use global CSS without any encapsulation.
|
||||
* - `ViewEncapsulation.ShadowDom`: Use the latest ShadowDOM API to natively encapsulate styles
|
||||
|
@ -226,7 +226,7 @@ function normalizeTemplate(normalizer: DirectiveNormalizer, o: {
|
||||
describe('normalizeLoadedTemplate', () => {
|
||||
it('should store the viewEncapsulation in the result',
|
||||
inject([DirectiveNormalizer], (normalizer: DirectiveNormalizer) => {
|
||||
const viewEncapsulation = ViewEncapsulation.Native;
|
||||
const viewEncapsulation = ViewEncapsulation.ShadowDom;
|
||||
const template = <CompileTemplateMetadata>normalizeTemplate(normalizer, {
|
||||
encapsulation: viewEncapsulation,
|
||||
template: '',
|
||||
|
Reference in New Issue
Block a user