diff options
Diffstat (limited to 'components/script/dom/trustedscripturl.rs')
-rw-r--r-- | components/script/dom/trustedscripturl.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/script/dom/trustedscripturl.rs b/components/script/dom/trustedscripturl.rs index 01a82a4fff7..ba1e0335abc 100644 --- a/components/script/dom/trustedscripturl.rs +++ b/components/script/dom/trustedscripturl.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use std::fmt; + use dom_struct::dom_struct; use crate::dom::bindings::codegen::Bindings::TrustedScriptURLBinding::TrustedScriptURLMethods; @@ -32,6 +34,13 @@ impl TrustedScriptURL { } } +impl fmt::Display for TrustedScriptURL { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.write_str(&self.data) + } +} + impl TrustedScriptURLMethods<crate::DomTypeHolder> for TrustedScriptURL { /// <https://www.w3.org/TR/trusted-types/#trustedscripturl-stringification-behavior> fn Stringifier(&self) -> DOMString { |