TrustedTypePolicy

The TrustedTypePolicy interface of the Trusted Types API defines a group of functions which create TrustedType objects.

MDN Reference

Properties

Link copied to clipboard

The name read-only property of the TrustedTypePolicy interface returns the name of the policy.

Functions

Link copied to clipboard
fun createHTML(input: String, vararg arguments: JsAny?): TrustedHTML

The createHTML() method of the TrustedTypePolicy interface creates a TrustedHTML object using a policy created by TrustedTypePolicyFactory.createPolicy().

Link copied to clipboard
fun createScript(input: String, vararg arguments: JsAny?): TrustedScript

The createScript() method of the TrustedTypePolicy interface creates a TrustedScript object using a policy created by TrustedTypePolicyFactory.createPolicy().

Link copied to clipboard
fun createScriptURL(input: String, vararg arguments: JsAny?): TrustedScriptURL

The createScriptURL() method of the TrustedTypePolicy interface creates a TrustedScriptURL object using a policy created by TrustedTypePolicyFactory.createPolicy().