Implement actual policy

This commit is contained in:
James Magahern
2021-10-21 13:24:58 -07:00
parent 70486c49de
commit fc7380ed21
6 changed files with 109 additions and 7 deletions

View File

@@ -35,6 +35,12 @@ NS_SWIFT_NAME(ScriptPolicy)
- (instancetype)initWithSecurityOrigin:(NSString *)origin policyType:(SBRScriptOriginPolicyType)policyType;
/// Returns YES if policy type allows embedded (<script>) JavaScript for the given origin.
- (BOOL)allowsEmbeddedJavaScript;
/// Returns YES if policy allows loading external JavaScript resource with the security origin `resourceOrigin`.
- (BOOL)allowsExternalJavaScriptResourceOrigin:(NSString *)resourceOrigin;
- (instancetype)init NS_UNAVAILABLE;
@end