"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/core/src/render3/interfaces/renderer.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.

renderer.ts  (angular-11.0.1):renderer.ts  (angular-11.0.2)
skipping to change at line 18 skipping to change at line 18
/** /**
* The goal here is to make sure that the browser DOM API is the Renderer. * The goal here is to make sure that the browser DOM API is the Renderer.
* We do this by defining a subset of DOM API to be the renderer and then * We do this by defining a subset of DOM API to be the renderer and then
* use that at runtime for rendering. * use that at runtime for rendering.
* *
* At runtime we can then use the DOM api directly, in server or web-worker * At runtime we can then use the DOM api directly, in server or web-worker
* it will be easy to implement such API. * it will be easy to implement such API.
*/ */
import {RendererStyleFlags2, RendererType2} from '../../render/api'; import {RendererStyleFlags2, RendererType2} from '../../render/api_flags';
import {getDocument} from './document'; import {getDocument} from './document';
import {RComment, RElement, RNode, RText} from './renderer_dom';
// TODO: cleanup once the code is merged in angular/angular // TODO: cleanup once the code is merged in angular/angular
export enum RendererStyleFlags3 { export enum RendererStyleFlags3 {
Important = 1 << 0, Important = 1 << 0,
DashCase = 1 << 1 DashCase = 1 << 1
} }
export type Renderer3 = ObjectOrientedRenderer3|ProceduralRenderer3; export type Renderer3 = ObjectOrientedRenderer3|ProceduralRenderer3;
export type GlobalTargetName = 'document'|'window'|'body'; export type GlobalTargetName = 'document'|'window'|'body';
skipping to change at line 112 skipping to change at line 113
begin?(): void; begin?(): void;
end?(): void; end?(): void;
} }
export const domRendererFactory3: RendererFactory3 = { export const domRendererFactory3: RendererFactory3 = {
createRenderer: (hostElement: RElement|null, rendererType: RendererType2|null) : Renderer3 => { createRenderer: (hostElement: RElement|null, rendererType: RendererType2|null) : Renderer3 => {
return getDocument(); return getDocument();
} }
}; };
/** Subset of API needed for appending elements and text nodes. */
export interface RNode {
/**
* Returns the parent Element, Document, or DocumentFragment
*/
parentNode: RNode|null;
/**
* Returns the parent Element if there is one
*/
parentElement: RElement|null;
/**
* Gets the Node immediately following this one in the parent's childNodes
*/
nextSibling: RNode|null;
/**
* Removes a child from the current node and returns the removed node
* @param oldChild the child node to remove
*/
removeChild(oldChild: RNode): RNode;
/**
* Insert a child node.
*
* Used exclusively for adding View root nodes into ViewAnchor location.
*/
insertBefore(newChild: RNode, refChild: RNode|null, isViewRoot: boolean): void
;
/**
* Append a child node.
*
* Used exclusively for building up DOM which are static (ie not View roots)
*/
appendChild(newChild: RNode): RNode;
}
/**
* Subset of API needed for writing attributes, properties, and setting up
* listeners on Element.
*/
export interface RElement extends RNode {
style: RCssStyleDeclaration;
classList: RDomTokenList;
className: string;
textContent: string|null;
setAttribute(name: string, value: string): void;
removeAttribute(name: string): void;
setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): vo
id;
addEventListener(type: string, listener: EventListener, useCapture?: boolean):
void;
removeEventListener(type: string, listener?: EventListener, options?: boolean)
: void;
setProperty?(name: string, value: any): void;
}
export interface RCssStyleDeclaration {
removeProperty(propertyName: string): string;
setProperty(propertyName: string, value: string|null, priority?: string): void
;
}
export interface RDomTokenList {
add(token: string): void;
remove(token: string): void;
}
export interface RText extends RNode {
textContent: string|null;
}
export interface RComment extends RNode {
textContent: string|null;
}
// Note: This hack is necessary so we don't erroneously get a circular dependenc y // Note: This hack is necessary so we don't erroneously get a circular dependenc y
// failure based on types. // failure based on types.
export const unusedValueExportToPlacateAjd = 1; export const unusedValueExportToPlacateAjd = 1;
 End of changes. 3 change blocks. 
80 lines changed or deleted 2 lines changed or added

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