Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit 58c8709

Browse files
committed
Merge pull request #238 from threeday0905/url-tostring
Add URL toString() method to return synonym for href.
2 parents a919a7b + ecb934d commit 58c8709

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/URL/URL.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,9 @@
467467
}
468468

469469
jURL.prototype = {
470+
toString: function() {
471+
return this.href;
472+
},
470473
get href() {
471474
if (this._isInvalid)
472475
return this._url;

0 commit comments

Comments
 (0)