goog.html.TrustedResourceUrl.fromConstant
), and not by invoking its
constructor. The constructor intentionally takes no parameters and the type
is immutable; hence only a default instance corresponding to the empty
string can be obtained via constructor invocation.
![]()
Utility method to create TrustedResourceUrl instances.
This function is considered "package private", i.e. calls (using "suppress
visibility") from other files within this package are considered acceptable.
DO NOT call this function from outside the goog.html package; use appropriate
wrappers instead.
Arguments:
Returns: !goog.html.TrustedResourceUrl
The initialized TrustedResourceUrl
object.
|
code » | ||
Creates a TrustedResourceUrl object from a compile-time constant string.
Compile-time constant strings are inherently program-controlled and hence
trusted.
Arguments:
|
code » | ||
Performs a runtime check that the provided object is indeed a
TrustedResourceUrl object, and returns its value.
Arguments:
Returns: string
The trustedResourceUrl object's contained string, unless
the run-time type check fails. In that case,
unwrap returns an
innocuous string, or, if assertions are enabled, throws
goog.asserts.AssertionError .
|
code » |