3 ms·
This seems pretty brittle. Did anyone look into Closure to see what the motivation for the regexp based checking is? There's a browser native URL splitting func
by fulafel 7y ago
This seems pretty brittle. Did anyone look into Closure to see what the motivation for the regexp based checking is? There's a browser native URL splitting function available to JS after all.
But I guess Closure dates from the IE6 era where trusting browsers for correctness was probably not a good idea..
- cesarb 7y ago> There's a browser native URL splitting function available to JS after all. It's the URL object (https://developer.mozilla.org/en-US/docs/Web/API/URL https://developer.mozilla.org/en-US/docs/Web/API/URL), isn't it? We tried using it at work... and found out that, as always seems to be the case, it's available everywhere except on Internet Explorer.