goog.html.TrustedResourceUrl
Provided By | |
---|---|
All Implemented Interfaces |
A URL which is under application control and from which script, CSS, and other resources that represent executable code, can be fetched.
Given that the URL can only be constructed from strings under application control and is used to load resources, bugs resulting in a malformed URL should not have a security impact and are likely to be easily detectable during testing. Given the wide number of non-RFC compliant URLs in use, stricter validation could prevent some applications from being able to use this type.
Instances of this type must be created via the factory method,
(fromConstant
, fromConstants
, format
or formatWithParams
), and not by
invoking its constructor. The constructor intentionally takes an extra
parameter that cannot be constructed outside of this file and the type is
immutable; hence only a default instance corresponding to the empty string
can be obtained via constructor invocation.
Creating TrustedResourceUrl objects HAS SIDE-EFFECTS due to calling Trusted Types Web API.
new TrustedResourceUrl( value, token )
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
See Also |