Rollup merge of #28400 - badboy:disable-browser-history-on-file, r=steveklabnik
history.pushState is defined, but not working whenever document.origin is "null" (literally that string, not just the null object). This is due to some security considerations and is unlikely to be ever working. For now just disable the usage of the history API when the documentation is accessed through a file:/// URL. See https://code.google.com/p/chromium/issues/detail?id=301210 for a Chrome-specific issue on the history API on file:/// URLs Closes #25953
This commit is contained in:
commit
6872d13e96
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,8 @@
|
|||
}
|
||||
|
||||
function browserSupportsHistoryApi() {
|
||||
return window.history && typeof window.history.pushState === "function";
|
||||
return document.location.protocol != "file:" &&
|
||||
window.history && typeof window.history.pushState === "function";
|
||||
}
|
||||
|
||||
function highlightSourceLines(ev) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue