Skip to content

Commit bcd3c1b

Browse files
authored
Removing getPolicyNames. (#264)
A proper introspection at policy creation time (possibly via events) will be created at a later point. Fixes #235.
1 parent cddc9e0 commit bcd3c1b

15 files changed

+109
-201
lines changed

dist/cjs/trustedtypes.api_only.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -529,18 +529,6 @@ const trustedTypesBuilderTestOnly = function() {
529529
return deepClone(map);
530530
}
531531

532-
/**
533-
* Returns all configured policy names (even for non-exposed policies).
534-
* @return {!Array<string>}
535-
*/
536-
function getPolicyNames() {
537-
// TODO(msamuel): Should we sort policyNames to avoid leaking or
538-
// encouraging dependency on the order in which policy names are
539-
// registered? I think JavaScript builtin sorts are efficient for
540-
// almost-sorted lists so the amortized cost is close to O(n).
541-
return policyNames.slice();
542-
}
543-
544532
/**
545533
* Creates a TT policy.
546534
*
@@ -630,8 +618,6 @@ const trustedTypesBuilderTestOnly = function() {
630618
// The main function to create policies.
631619
createPolicy,
632620

633-
getPolicyNames,
634-
635621
// Type checkers, also validating the object was initialized through a
636622
// policy.
637623
isHTML: isTrustedTypeChecker(TrustedHTML),
@@ -711,7 +697,6 @@ function setupPolyfill() {
711697
'isScriptURL': tt.isScriptURL,
712698
'isScript': tt.isScript,
713699
'createPolicy': tt.createPolicy,
714-
'getPolicyNames': tt.getPolicyNames,
715700
'getAttributeType': tt.getAttributeType,
716701
'getPropertyType': tt.getPropertyType,
717702
'getTypeMapping': tt.getTypeMapping,

dist/es5/trustedtypes.api_only.build.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/es5/trustedtypes.api_only.build.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/es5/trustedtypes.build.js

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/es5/trustedtypes.build.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/es6/trustedtypes.api_only.build.js

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/es6/trustedtypes.api_only.build.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)