docs(security): mark the various DomAdapters as unsafe. (#10868)
Part of #8511.
This commit is contained in:
parent
4829fbb95c
commit
3009be8d6e
|
@ -64,6 +64,9 @@ var _chromeNumKeyPadMap = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A `DomAdapter` powered by full browser DOM APIs.
|
* A `DomAdapter` powered by full browser DOM APIs.
|
||||||
|
*
|
||||||
|
* @security Tread carefully! Interacting with the DOM directly is dangerous and
|
||||||
|
* can introduce XSS risks.
|
||||||
*/
|
*/
|
||||||
/* tslint:disable:requireParameterType */
|
/* tslint:disable:requireParameterType */
|
||||||
export class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
export class BrowserDomAdapter extends GenericBrowserDomAdapter {
|
||||||
|
|
|
@ -14,6 +14,9 @@ import {isFunction, isPresent} from '../facade/lang';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides DOM operations in any browser environment.
|
* Provides DOM operations in any browser environment.
|
||||||
|
*
|
||||||
|
* @security Tread carefully! Interacting with the DOM directly is dangerous and
|
||||||
|
* can introduce XSS risks.
|
||||||
*/
|
*/
|
||||||
export abstract class GenericBrowserDomAdapter extends DomAdapter {
|
export abstract class GenericBrowserDomAdapter extends DomAdapter {
|
||||||
private _animationPrefix: string = null;
|
private _animationPrefix: string = null;
|
||||||
|
|
|
@ -29,6 +29,9 @@ export function setRootDomAdapter(adapter: DomAdapter) {
|
||||||
/* tslint:disable:requireParameterType */
|
/* tslint:disable:requireParameterType */
|
||||||
/**
|
/**
|
||||||
* Provides DOM operations in an environment-agnostic way.
|
* Provides DOM operations in an environment-agnostic way.
|
||||||
|
*
|
||||||
|
* @security Tread carefully! Interacting with the DOM directly is dangerous and
|
||||||
|
* can introduce XSS risks.
|
||||||
*/
|
*/
|
||||||
export abstract class DomAdapter {
|
export abstract class DomAdapter {
|
||||||
public resourceLoaderType: Type<any> = null;
|
public resourceLoaderType: Type<any> = null;
|
||||||
|
|
|
@ -35,6 +35,12 @@ function _notImplemented(methodName: any /** TODO #9100 */) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tslint:disable:requireParameterType */
|
/* tslint:disable:requireParameterType */
|
||||||
|
/**
|
||||||
|
* A `DomAdapter` powered by the `parse5` NodeJS module.
|
||||||
|
*
|
||||||
|
* @security Tread carefully! Interacting with the DOM directly is dangerous and
|
||||||
|
* can introduce XSS risks.
|
||||||
|
*/
|
||||||
export class Parse5DomAdapter extends DomAdapter {
|
export class Parse5DomAdapter extends DomAdapter {
|
||||||
static makeCurrent() {
|
static makeCurrent() {
|
||||||
parser = new parse5.Parser(parse5.TreeAdapters.htmlparser2);
|
parser = new parse5.Parser(parse5.TreeAdapters.htmlparser2);
|
||||||
|
|
Loading…
Reference in New Issue