Skip to main content
Version: 2.x

DOMPolicy.protect() method

@microsoft/fast-element > DOMPolicy > protect

DOMPolicy.protect() method

Protects a DOM sink that intends to write to the DOM.

Signature:

protect(tagName: string | null, aspect: DOMAspect, aspectName: string, sink: DOMSink): DOMSink;

Parameters

Parameter

Type

Description

tagName

string | null

The tag name for the element to write to.

aspect

DOMAspect

The aspect of the DOM to write to.

aspectName

string

The name of the aspect to write to.

sink

DOMSink

The sink that is used to write to the DOM.

Returns:

DOMSink