-
Notifications
You must be signed in to change notification settings - Fork 52
Add statics from builtin as needed #4
Comments
Wouldn't exactly say sometimes. Every single current release of every major browser supports the API. Also, if by "add those" you mean save references to the methods and put them on a new URL object, that is not going to work either, as URL is also used as a native function for URL parsing. ( Simply put, URL is a global variable that should not ever be redefined unless you're polyfilling it, as I do in Blob.js. Whatever Polymer needs it for, it can use a differently named global variable if it's not using it for the sole purpose of polyfilling it. |
You are right, all browsers we care about have We already feature detect and keep the original URL if it can be new'ed. The PR makes sure that we add the statics if the builtin is not newable. |
Oh, so Polymer uses URL for it's URL processing abilities. Do you realize that See my |
@eligrey That is mostly correct. There are some issues with it. And it is also slower, since it needs a new document and uses |
Ah, thanks for linking me to that. I wasn't aware of that polyfill, mostly as mine focuses on the blob aspects. |
The builtin URL sometimes has some statics on it:
http://dev.w3.org/2006/webapi/FileAPI/#URL-object
We need to add those in case there is a webkitURL and msURL etc.
The text was updated successfully, but these errors were encountered: