@@ -115,7 +115,7 @@ <h1 id="Node.appendChild" style="display: block;" class=" scalatex-site-Styles-h
115
115
val child = dom.document.createElement("div")
116
116
child.textContent = "Hi from Scala-js-dom"
117
117
div.appendChild(child)
118
- }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L20-L25 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < a class ="pure-button " onclick ="ExampleNodeAppendChild.main(document.getElementById('82012 ')) "> Run</ a > < div > < div id ="82012 " style ="background-color: #fafafa; "> div</ div > </ div > </ div > < div style ="clear: both; "> </ div > </ div >
118
+ }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L20-L25 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < a class ="pure-button " onclick ="ExampleNodeAppendChild.main(document.getElementById('209511 ')) "> Run</ a > < div > < div id ="209511 " style ="background-color: #fafafa; "> div</ div > </ div > </ div > < div style ="clear: both; "> </ div > </ div >
119
119
120
120
< h1 id ="Node.onmousemove " style ="display: block; " class =" scalatex-site-Styles-hoverContainer scalatex-site-Styles-headerTag "> < a class =" scalatex-site-Styles-headerLink " href ="#Node.onmousemove " style ="position: absolute;right: 0px; "> < i class ="fa fa-link "> </ i > </ a > Node.onmousemove</ h1 >
121
121
< div > < div style ="width: 50%;float: left; "> < pre class =" scalatex-site-Styles-hoverContainer "> < code class ="scala scalatex-site-Styles-highlightMe "> def main(pre: html.Pre) = {
@@ -130,7 +130,7 @@ <h1 id="Node.onmousemove" style="display: block;" class=" scalatex-site-Styles-h
130
130
|e.screenY ${e.screenY}
131
131
""".stripMargin
132
132
}
133
- }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L113-L126 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < pre id ="495816 " style ="background-color: #fafafa; "> Hover this box!</ pre > </ div > < script > ExampleEventHandler . main ( document . getElementById ( '495816 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
133
+ }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L113-L126 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < pre id ="996941 " style ="background-color: #fafafa; "> Hover this box!</ pre > </ div > < script > ExampleEventHandler . main ( document . getElementById ( '996941 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
134
134
135
135
< h1 id ="dom.btoa " style ="display: block; " class =" scalatex-site-Styles-hoverContainer scalatex-site-Styles-headerTag "> < a class =" scalatex-site-Styles-headerLink " href ="#dom.btoa " style ="position: absolute;right: 0px; "> < i class ="fa fa-link "> </ i > </ a > dom.btoa</ h1 >
136
136
< div > < div style ="width: 50%;float: left; "> < pre class =" scalatex-site-Styles-hoverContainer "> < code class ="scala scalatex-site-Styles-highlightMe "> def main(in: html.Input,
@@ -139,7 +139,7 @@ <h1 id="dom.btoa" style="display: block;" class=" scalatex-site-Styles-hoverCont
139
139
out.textContent =
140
140
dom.window.btoa(in.value)
141
141
}
142
- }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L101-L108 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < input style ="width: 100%;background-color: #fafafa; " placeholder ="Enter text to b64 encode " id ="442334 " /> < div id ="585316 " style ="background-color: #fafafa; "> </ div > </ div > < script > ExampleBase64 . main ( document . getElementById ( '442334 ' ) , document . getElementById ( '585316 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
142
+ }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L101-L108 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < input style ="width: 100%;background-color: #fafafa; " placeholder ="Enter text to b64 encode " id ="754120 " /> < div id ="742825 " style ="background-color: #fafafa; "> </ div > </ div > < script > ExampleBase64 . main ( document . getElementById ( '754120 ' ) , document . getElementById ( '742825 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
143
143
144
144
< h1 id ="dom.localStorage " style ="display: block; " class =" scalatex-site-Styles-hoverContainer scalatex-site-Styles-headerTag "> < a class =" scalatex-site-Styles-headerLink " href ="#dom.localStorage " style ="position: absolute;right: 0px; "> < i class ="fa fa-link "> </ i > </ a > dom.localStorage</ h1 >
145
145
< div > < div style ="width: 50%;float: left; "> < pre class =" scalatex-site-Styles-hoverContainer "> < code class ="scala scalatex-site-Styles-highlightMe "> def main(in: html.Input, box: html.Div) = {
@@ -155,7 +155,7 @@ <h1 id="dom.localStorage" style="display: block;" class=" scalatex-site-Styles-h
155
155
box.textContent =
156
156
"Saved! " + in.value
157
157
}
158
- }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L56-L70 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < input style ="width: 100%;background-color: #fafafa; " id ="733944 " /> < div id ="118495 " style ="background-color: #fafafa; "> </ div > </ div > < script > ExampleLocalStorage . main ( document . getElementById ( '733944 ' ) , document . getElementById ( '118495 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
158
+ }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L56-L70 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < input style ="width: 100%;background-color: #fafafa; " id ="625646 " /> < div id ="740282 " style ="background-color: #fafafa; "> </ div > </ div > < script > ExampleLocalStorage . main ( document . getElementById ( '625646 ' ) , document . getElementById ( '740282 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
159
159
160
160
< h1 id ="dom.HTMLCanvasElement " style ="display: block; " class =" scalatex-site-Styles-hoverContainer scalatex-site-Styles-headerTag "> < a class =" scalatex-site-Styles-headerLink " href ="#dom.HTMLCanvasElement " style ="position: absolute;right: 0px; "> < i class ="fa fa-link "> </ i > </ a > dom.HTMLCanvasElement</ h1 >
161
161
< div > < div style ="width: 50%;float: left; "> < pre class =" scalatex-site-Styles-hoverContainer "> < code class ="scala scalatex-site-Styles-highlightMe "> def main(c: html.Canvas) = {
@@ -178,7 +178,7 @@ <h1 id="dom.HTMLCanvasElement" style="display: block;" class=" scalatex-site-Sty
178
178
ctx.arc(w/2, w/2, w/2, 0, 3.14)
179
179
180
180
ctx.stroke()
181
- }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L75-L96 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < canvas id ="79127 " style ="background-color: #fafafa; "> </ canvas > </ div > < script > ExampleCanvas . main ( document . getElementById ( '79127 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
181
+ }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L75-L96 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < canvas id ="544401 " style ="background-color: #fafafa; "> </ canvas > </ div > < script > ExampleCanvas . main ( document . getElementById ( '544401 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
182
182
183
183
< h1 id ="dom.Fetch " style ="display: block; " class =" scalatex-site-Styles-hoverContainer scalatex-site-Styles-headerTag "> < a class =" scalatex-site-Styles-headerLink " href ="#dom.Fetch " style ="position: absolute;right: 0px; "> < i class ="fa fa-link "> </ i > </ a > dom.Fetch</ h1 >
184
184
< div > < div style ="width: 50%;float: left; "> < pre class =" scalatex-site-Styles-hoverContainer "> < code class ="scala scalatex-site-Styles-highlightMe "> def main(pre: html.Pre) = {
@@ -197,7 +197,7 @@ <h1 id="dom.Fetch" style="display: block;" class=" scalatex-site-Styles-hoverCon
197
197
}
198
198
for (text <- responseText)
199
199
pre.textContent = text
200
- }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L131-L148 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < a class ="pure-button " onclick ="ExampleFetch.main(document.getElementById('47982 ')) "> Run</ a > < div > < pre id ="47982 " style ="background-color: #fafafa; "> output</ pre > </ div > </ div > < div style ="clear: both; "> </ div > </ div >
200
+ }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L131-L148 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < a class ="pure-button " onclick ="ExampleFetch.main(document.getElementById('776757 ')) "> Run</ a > < div > < pre id ="776757 " style ="background-color: #fafafa; "> output</ pre > </ div > </ div > < div style ="clear: both; "> </ div > </ div >
201
201
202
202
< h1 id ="dom.Websocket " style ="display: block; " class =" scalatex-site-Styles-hoverContainer scalatex-site-Styles-headerTag "> < a class =" scalatex-site-Styles-headerLink " href ="#dom.Websocket " style ="position: absolute;right: 0px; "> < i class ="fa fa-link "> </ i > </ a > dom.Websocket</ h1 >
203
203
< div > < div style ="width: 50%;float: left; "> < pre class =" scalatex-site-Styles-hoverContainer "> < code class ="scala scalatex-site-Styles-highlightMe "> def main(in: html.Input,
@@ -214,7 +214,7 @@ <h1 id="dom.Websocket" style="display: block;" class=" scalatex-site-Styles-hove
214
214
socket.send(in.value)
215
215
}
216
216
}
217
- }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L153-L168 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < input placeholder ="Type something in " id ="861142 " style ="background-color: #fafafa; " /> < pre id ="132873 " style ="background-color: #fafafa; "> output</ pre > </ div > < script > ExampleWebsocket . main ( document . getElementById ( '861142 ' ) , document . getElementById ( '132873 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
217
+ }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L153-L168 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < div > < input placeholder ="Type something in " id ="671954 " style ="background-color: #fafafa; " /> < pre id ="193219 " style ="background-color: #fafafa; "> output</ pre > </ div > < script > ExampleWebsocket . main ( document . getElementById ( '671954 ' ) , document . getElementById ( '193219 ' ) ) </ script > </ div > < div style ="clear: both; "> </ div > </ div >
218
218
219
219
< h1 id ="Element.style " style ="display: block; " class =" scalatex-site-Styles-hoverContainer scalatex-site-Styles-headerTag "> < a class =" scalatex-site-Styles-headerLink " href ="#Element.style " style ="position: absolute;right: 0px; "> < i class ="fa fa-link "> </ i > </ a > Element.style</ h1 >
220
220
< div > < div style ="width: 50%;float: left; "> < pre class =" scalatex-site-Styles-hoverContainer "> < code class ="scala scalatex-site-Styles-highlightMe "> def main(div: html.Div) = {
@@ -226,7 +226,7 @@ <h1 id="Element.style" style="display: block;" class=" scalatex-site-Styles-hove
226
226
util.Random.nextInt(colors.length)
227
227
228
228
div.style.color = colors(index)
229
- }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L41-L51 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < a class ="pure-button " onclick ="ExampleElementStyle.main(document.getElementById('496250 ')) "> Run</ a > < div > < div style ="height: 50px;background-color: #fafafa; " id ="496250 "> < b > div</ b > </ div > </ div > </ div > < div style ="clear: both; "> </ div > </ div >
229
+ }</ code > < a class =" scalatex-site-Styles-headerLink " style ="position: absolute;right: 0.5em;top: 0.5em;display: block;font-size: 24px; " href ="https://github.com/scala-js/scala-js-dom/tree/main/example/src/main/scala/example/Example.scala#L41-L51 " target ="_blank "> < i class ="fa fa-link "> </ i > </ a > </ pre > </ div > < div style ="width: 50%;float: left;padding: 8px;box-sizing: border-box; "> < a class ="pure-button " onclick ="ExampleElementStyle.main(document.getElementById('485998 ')) "> Run</ a > < div > < div style ="height: 50px;background-color: #fafafa; " id ="485998 "> < b > div</ b > </ div > </ div > </ div > < div style ="clear: both; "> </ div > </ div >
230
230
231
231
< p >
232
232
The goal of this project is to provide a thin-but-idiomatic-scala interface to modern browser APIs. In particular:</ p >
0 commit comments