RE: In WebIDL, should having a .prototype on interface objects be optional?

> From: Boris Zbarsky [mailto:bzbarsky@MIT.EDU]
> 
> On 9/28/12 12:38 PM, Travis Leithead wrote:
> > It seems more important to check for the features of the spec, rather
> than spec support in general. I would expect if (URL.createObjectURL) for
> example.
> 
> You have it backwards.  That's checking for the file API bits.  How do you
> check whether you can actually work with URL objects?

I guess you'd check for URL.href then? Or try { new URL("/test"); } catch (ex) { console.log("not supported"); }

Received on Friday, 28 September 2012 19:57:22 UTC