Skip to content

Commit 29d33f6

Browse files
committed
Merge branch 'gh-pages' of https://github.com/BonsaiDen/JavaScript-Garden into gh-pages
Conflicts: css/print.css
2 parents 5326fe4 + 22cced0 commit 29d33f6

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

css/print.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ header h1, h2, h3 {
4242
article h2 > code, article h3 > code {
4343
text-transform: none;
4444
font-size: 0.9em;
45-
vertical-align: 2px;
4645
}
4746

4847
article h2 a {
@@ -54,6 +53,11 @@ article {
5453
width: 78%;
5554
padding-bottom: 0;
5655
border-bottom-width: 2px;
56+
page-break-before: always;
57+
}
58+
59+
header article {
60+
page-break-before: auto;
5761
}
5862

5963
aside {
@@ -90,6 +94,10 @@ article code {
9094
padding: 1px 3px;
9195
}
9296

97+
article pre code {
98+
padding: 0px;
99+
}
100+
93101
article li {
94102
margin-top: 6px;
95103
}
@@ -132,4 +140,4 @@ article ul, article ol {
132140
.kwd, .tag {
133141
color: #006;
134142
font-weight: bold;
135-
}
143+
}

index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,9 +1064,14 @@ <h1>JavaScript Garden</h1>
10641064
</section><section><header><h3>Comparing custom objects</h3></header>
10651065
<pre><code>function Foo() {}
10661066
function Bar() {}
1067-
Bar.prototype = Foo;
1067+
Bar.prototype = new Foo();
10681068

10691069
new Bar() instanceof Bar; // true
1070+
new Bar() instanceof Foo; // true
1071+
1072+
// This just sets Bar.prototype to the function object Foo
1073+
// But not to an actual instance of Foo
1074+
Bar.prototype = Foo;
10701075
new Bar() instanceof Foo; // false
10711076
</code></pre>
10721077
</section><section><header><h3>Using <code>instanceof</code> with native types</h3></header>

0 commit comments

Comments
 (0)