- From: Tab Atkins Jr. <notifications@github.com>
- Date: Fri, 31 Mar 2017 13:36:01 -0700
- To: whatwg/url <url@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 31 March 2017 20:36:52 UTC
> it seems a little weird that just because toJSON is the same as the stringification behavior, it needs to be annotated as a stringifier rather than a method, is that really how this should work? Just depends on how you want it to link. To get `stringifier` to link, define "stringification behavior". To get `toJSON()` to link, define the `toJSON()` method. Or do both. The "stringification behavior" thing is mostly to handle anonymous stringifiers. I've thought about also just making it an implicit `toString()` method if no explicit one exists. (Even if you say `stringifier toJSON()`, you still get a `toString()` defined by it as well.) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/url/pull/288#issuecomment-290823143
Received on Friday, 31 March 2017 20:36:52 UTC