createPolicy method Null safety

TrustedTypePolicy createPolicy(
  1. String policyName,
  2. [TrustedTypePolicyOptions? policyOptions]
)

Creates a TrustedTypePolicy object that implements the rules passed as policyOptions. var policy = TrustedTypePolicyFactory.createPolicy(policyName,policyOptions);

Implementation

external TrustedTypePolicy createPolicy(String policyName,
    [TrustedTypePolicyOptions? policyOptions]);