Operator overloading for non-value objects

Claude Pache claude.pache at gmail.com
Mon Jan 13 05:47:59 PST 2014

Le 13 janv. 2014 à 11:45, Anne van Kesteren <annevk at annevk.nl> a écrit :

>  url.toString() == url2.toString()

Experiences on latest versions of Firefox and Safari: `url.toString()` and `url.valueOf()` give me `"[object URL]"`. I expected to obtain an equivalent of `url.href`. I haven't found mention of `toString` or `valueOf` in the WHATWG URL spec (http://url.spec.whatwg.org/), although I may have missed the feature. Was there an oversight?


More information about the es-discuss mailing list