File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -388,6 +388,11 @@ DeprecatedString URL::serialize_for_display() const
388
388
return builder.to_deprecated_string ();
389
389
}
390
390
391
+ ErrorOr<String> URL::to_string () const
392
+ {
393
+ return String::from_deprecated_string (serialize ());
394
+ }
395
+
391
396
// https://html.spec.whatwg.org/multipage/origin.html#ascii-serialisation-of-an-origin
392
397
// https://url.spec.whatwg.org/#concept-url-origin
393
398
DeprecatedString URL::serialize_origin () const
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ class URL {
99
99
DeprecatedString serialize (ExcludeFragment = ExcludeFragment::No) const ;
100
100
DeprecatedString serialize_for_display () const ;
101
101
DeprecatedString to_deprecated_string () const { return serialize (); }
102
+ ErrorOr<String> to_string () const ;
102
103
103
104
// HTML origin
104
105
DeprecatedString serialize_origin () const ;
You can’t perform that action at this time.
0 commit comments