blob: 2adbc9ab97af2e37d673e8e4b040a2d088e47be1 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
Exposed=(Window, Worker),
] interface TrustedTypePolicyFactory {
[RaisesException, Unforgeable] TrustedTypePolicy createPolicy(DOMString policyName, TrustedTypePolicyOptions policyOptions, optional boolean exposed = false);
[Unforgeable] TrustedTypePolicy getExposedPolicy(DOMString policyName);
// All the policy object names that have been created
[Affects=Nothing, Unforgeable] sequence<DOMString> getPolicyNames();
[CallWith=ScriptState, Unforgeable] boolean isHTML(object? checkedObject);
[CallWith=ScriptState, Unforgeable] boolean isScript(object? checkedObject);
[CallWith=ScriptState, Unforgeable] boolean isScriptURL(object? checkedObject);
[CallWith=ScriptState, Unforgeable] boolean isURL(object? checkedObject);