visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

Fix - IE11 anchor handling not working #486

Closed LiberQuack closed 5 years ago

LiberQuack commented 6 years ago

Once IE11 don't support URL.hostname, we can use URL.host to check "sameOrigin" on an anchor... See how URL behaves in both environments


const url = new URL("http://10.20.0.57:7000/")

console.log(url.hostname) //Chrome - 10.20.0.57
console.log(url.hostname) //IE11 - undefined

console.log(url.host) //Chrome - 10.20.0.57:7000
console.log(url.host) //IE11 - 10.20.0.57:7000
coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 90.449% when pulling fe9c4a40e4b697e7aeaf0253310e51539ee1b99a on QuackMartins:patch-1 into 043e68cfdea0c8adec24c4e719c4af2c956b96e0 on visionmedia:master.

matthewp commented 5 years ago

If you rebase with master it should pass CI now.

BTW, don't check in page.js.

bensbigolbeard commented 5 years ago

@QuackMartins this has been out here a while, but any chance you could rebase this change?

If needed, i can open new PR with this change. 👍

LiberQuack commented 5 years ago

Hey guys, Sorry... I missed the @matthewp message I'll fix this PR now