- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Tue, 08 Jul 2014 21:44:09 -0400
- To: www-style@w3.org
On 7/8/14, 8:07 PM, Peter Linss wrote:
> stringifiers operations can't take arguments[1], so you'd need to do it as:
> interface RGBAColor {
> ...
> stringifier DOMString (); // rgba()
> stringifier DOMString hex3();
> stringifier DOMString hex6();
You can only have one stringifier.
If you want some sort of toString method that does something with
arguments, just define a toString method that has arguments.
"stringifier" is just syntax sugar for a particular kind of toString method.
> or you have to change the stringifier into a regular method, like:
> DOMString toString(optional DOMString type="rgba");
Yes, exactly.
-Boris
Received on Wednesday, 9 July 2014 01:44:39 UTC