Command (executed in this order) | Chrome 72 | Firefox 65 | Safari 12.0.3 | IE11 |
---|---|---|---|---|
window.location.hash |
"" |
"" |
"" |
"" |
window.location.href |
"https://example.com/" |
"http://example.com/" |
"http://example.com/" |
"http://example.com/" |
window.location.hash = '#' |
"#" |
"#" |
"#" |
"#" |
window.location.href |
"https://example.com/" |
"http://example.com/#" |
"http://example.com/" |
"http://example.com/#" |
window.location.hash |
"" |
"" |
"" |
"#" |
window.location.hash = '#1' |
"#1" |
"#1" |
"#1" |
"#1" |
window.location.href |
"https://example.com/#1" |
"http://example.com/#1" |
"http://example.com/#1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// normal function x | |
function x() { | |
this.a = 1; | |
} | |
// First of all, the term "prototype" is confusing because it can refer to 2 different things. | |
// There is an object's prototype, which is another object used to look up missing properties. | |
// But there is also an actual `prototype` property on Function and class objects, which is NOT a prototype for that function object! | |
// Instead, it serves a very specific purpose: that object becomes a prototype of all instances returned when that function is used as a constructor: | |
(new x()).__proto__ === x.prototype |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body> | |
<div id="surfly-control" class="hidden">CLICK ME!</div> | |
<style> | |
.start-surfly { | |
cursor: pointer; | |
color: red; | |
} |