43 lines
3.1 KiB
JavaScript
43 lines
3.1 KiB
JavaScript
goog.provide("goog.html.uncheckedconversions");
|
|
goog.require("goog.asserts");
|
|
goog.require("goog.html.SafeHtml");
|
|
goog.require("goog.html.SafeScript");
|
|
goog.require("goog.html.SafeStyle");
|
|
goog.require("goog.html.SafeStyleSheet");
|
|
goog.require("goog.html.SafeUrl");
|
|
goog.require("goog.html.TrustedResourceUrl");
|
|
goog.require("goog.string.Const");
|
|
goog.require("goog.string.internal");
|
|
goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function(justification, html) {
|
|
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
|
|
goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
|
|
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(html);
|
|
};
|
|
goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function(justification, script) {
|
|
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
|
|
goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
|
|
return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(script);
|
|
};
|
|
goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function(justification, style) {
|
|
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
|
|
goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
|
|
return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style);
|
|
};
|
|
goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function(justification, styleSheet) {
|
|
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
|
|
goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
|
|
return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(styleSheet);
|
|
};
|
|
goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
|
|
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
|
|
goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
|
|
return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url);
|
|
};
|
|
goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function(justification, url) {
|
|
goog.asserts.assertString(goog.string.Const.unwrap(justification), "must provide justification");
|
|
goog.asserts.assert(!goog.string.internal.isEmptyOrWhitespace(goog.string.Const.unwrap(justification)), "must provide non-empty justification");
|
|
return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(url);
|
|
};
|
|
|
|
//# sourceMappingURL=goog.html.uncheckedconversions.js.map
|