Is it possible to override window.location.hostname in Javascript? -
i'm curious there possibility override window.location.hostname? didn't found on google... searched wrong phrases because think had asked before me.
sorry bad english.
edit: more specific. don't want that. want know if can override execute code.
in general - have list of domains approve execute code. when
if (window.location.hostname === myurl.com)
gives true go, other case have alert or something. don't want that:
window.location.hostname = "myurl.com" if (window.location.hostname === myurl.com)
according reference: https://developer.mozilla.org/en-us/docs/dom/window.location these properties. can "set them navigate url" - however, result in redirection.
Comments
Post a Comment