Skip to content Skip to sidebar Skip to footer

What Happens If I Override `window.URL`

I've created a custom URL object in JavaScript and discovered that Firefox already has an object at window.URL of type MozURL. I haven't noticed any other browser setting window.UR

Solution 1:

It's new in Firefox 4, and part of a W3C working draft for the File API.

From the documentation:

Provides methods used for creating object URLs.

You could change it; if you wanted - but it might become an API that you will want to use later. It might also surprise other developers that URL isn't what they expect it to be. I'd suggest going with the namespace solution.


Post a Comment for "What Happens If I Override `window.URL`"