"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/core/src/render/api.ts" between
angular-11.0.1.tar.gz and angular-11.0.2.tar.gz

About: Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript.

api.ts  (angular-11.0.1):api.ts  (angular-11.0.2)
/** /**
* @license * @license
* Copyright Google LLC All Rights Reserved. * Copyright Google LLC All Rights Reserved.
* *
* Use of this source code is governed by an MIT-style license that can be * Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {InjectionToken} from '../di/injection_token'; import {InjectionToken} from '../di/injection_token';
import {ViewEncapsulation} from '../metadata/view';
import {isProceduralRenderer} from '../render3/interfaces/renderer'; import {isProceduralRenderer} from '../render3/interfaces/renderer';
import {isLView} from '../render3/interfaces/type_checks'; import {isLView} from '../render3/interfaces/type_checks';
import {LView, RENDERER} from '../render3/interfaces/view'; import {LView, RENDERER} from '../render3/interfaces/view';
import {getCurrentTNode, getLView} from '../render3/state'; import {getCurrentTNode, getLView} from '../render3/state';
import {getComponentLViewByIndex} from '../render3/util/view_utils'; import {getComponentLViewByIndex} from '../render3/util/view_utils';
import {noop} from '../util/noop'; import {noop} from '../util/noop';
import {RendererStyleFlags2, RendererType2} from './api_flags';
export const Renderer2Interceptor = new InjectionToken<Renderer2[]>('Renderer2In terceptor'); export const Renderer2Interceptor = new InjectionToken<Renderer2[]>('Renderer2In terceptor');
/** /**
* Used by `RendererFactory2` to associate custom rendering data and styles
* with a rendering implementation.
* @publicApi
*/
export interface RendererType2 {
/**
* A unique identifying string for the new renderer, used when creating
* unique styles for encapsulation.
*/
id: string;
/**
* The view encapsulation type, which determines how styles are applied to
* DOM elements. One of
* - `Emulated` (default): Emulate native scoping of styles.
* - `Native`: Use the native encapsulation mechanism of the renderer.
* - `ShadowDom`: Use modern [Shadow
* DOM](https://w3c.github.io/webcomponents/spec/shadow/) and
* create a ShadowRoot for component's host element.
* - `None`: Do not provide any template or style encapsulation.
*/
encapsulation: ViewEncapsulation;
/**
* Defines CSS styles to be stored on a renderer instance.
*/
styles: (string|any[])[];
/**
* Defines arbitrary developer-defined data to be stored on a renderer instanc
e.
* This is useful for renderers that delegate to other renderers.
*/
data: {[kind: string]: any};
}
/**
* Creates and initializes a custom renderer that implements the `Renderer2` bas e class. * Creates and initializes a custom renderer that implements the `Renderer2` bas e class.
* *
* @publicApi * @publicApi
*/ */
export abstract class RendererFactory2 { export abstract class RendererFactory2 {
/** /**
* Creates and initializes a custom renderer for a host DOM element. * Creates and initializes a custom renderer for a host DOM element.
* @param hostElement The element to render. * @param hostElement The element to render.
* @param type The base class to implement. * @param type The base class to implement.
* @returns The new custom renderer instance. * @returns The new custom renderer instance.
skipping to change at line 82 skipping to change at line 49
*/ */
abstract end?(): void; abstract end?(): void;
/** /**
* Use with animations test-only mode. Notifies the test when rendering has co mpleted. * Use with animations test-only mode. Notifies the test when rendering has co mpleted.
* @returns The asynchronous result of the developer-defined function. * @returns The asynchronous result of the developer-defined function.
*/ */
abstract whenRenderingDone?(): Promise<any>; abstract whenRenderingDone?(): Promise<any>;
} }
/** /**
* Flags for renderer-specific style modifiers.
* @publicApi
*/
export enum RendererStyleFlags2 {
// TODO(misko): This needs to be refactored into a separate file so that it ca
n be imported from
// `node_manipulation.ts` Currently doing the import cause resolution order to
change and fails
// the tests. The work around is to have hard coded value in `node_manipulatio
n.ts` for now.
/**
* Marks a style as important.
*/
Important = 1 << 0,
/**
* Marks a style as using dash case naming (this-is-dash-case).
*/
DashCase = 1 << 1
}
/**
* Extend this base class to implement custom rendering. By default, Angular * Extend this base class to implement custom rendering. By default, Angular
* renders a template into DOM. You can use custom rendering to intercept * renders a template into DOM. You can use custom rendering to intercept
* rendering calls, or to render to something other than DOM. * rendering calls, or to render to something other than DOM.
* *
* Create your custom renderer using `RendererFactory2`. * Create your custom renderer using `RendererFactory2`.
* *
* Use a custom renderer to bypass Angular's templating and * Use a custom renderer to bypass Angular's templating and
* make custom UI changes that can't be expressed declaratively. * make custom UI changes that can't be expressed declaratively.
* For example if you need to set a property or an attribute whose name is * For example if you need to set a property or an attribute whose name is
* not statically known, use the `setProperty()` or * not statically known, use the `setProperty()` or
 End of changes. 4 change blocks. 
56 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)