npm.io
0.28.11 • Published 1 week ago

@locker/internal-policy

Licence
SEE LICENSE IN LICENSE.txt
Version
0.28.11
Deps
5
Size
33 kB
Vulns
0
Weekly
0

@locker/internal-policy

Lightning Web Security Trusted LWS Policy

This package is meant to be only usable internally by @locker packages.

Signing Example:

  import { lwsInternalPolicy } from '@locker/internal-policy'

  script.src = lwsInternalPolicy.createScriptURL('...');

NOTE: if polyfills are needed to support additional trustedTypes functionality, such as getAttributeType or getPropertyType, the code at https://github.com/w3c/trusted-types/blob/main/src/trustedtypes.js is a great resource to get started.