A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy/name below:

TrustedTypePolicy: name property - Web APIs

TrustedTypePolicy: name property

Limited availability

Note: This feature is available in Web Workers.

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

Value

A string containing the name of the policy.

Examples

In the below example a policy called myEscapePolicy is created using TrustedTypePolicyFactory.createPolicy() and is represented by the object escapeHTMLPolicy. Calling name on this object returns the string "myEscapePolicy".

const escapeHTMLPolicy = trustedTypes.createPolicy("myEscapePolicy", {
  createHTML: (string) => string.replace(/</g, "&lt;"),
});

console.log(escapeHTMLPolicy.name); /* "myEscapePolicy" */
Specifications Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4