Skip to main content
Version: 2.x

ViewTemplate.withPolicy() method

@microsoft/fast-element > ViewTemplate > withPolicy

ViewTemplate.withPolicy() method

Sets the DOMPolicy for this template.

Signature:

withPolicy(policy: DOMPolicy): this;

Parameters

Parameter

Type

Description

policy

DOMPolicy

The policy to associated with this template.

Returns:

this

The modified template instance.

Remarks

The DOMPolicy can only be set once for a template and cannot be set after the template is compiled.