File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed 
example/src/main/scala/example Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,23 @@ object Alert {
1818object  NodeAppendChild  {
1919 @ JSExport 
2020 def  main (div : html.Div ) =  {
21-  val  child  =  dom.document
22-  .createElement(" div" 
23- 
24-  child.textContent = 
25-  " Hi from Scala-js-dom" 
26- 
21+  val  child  =  dom.document.createElement(" div" 
22+  child.textContent =  " Hi from Scala-js-dom" 
2723 div.appendChild(child)
2824 }
2925}
3026
27+ @ JSExportTopLevel (" ExampleNodeReplaceChildren" 
28+ object  NodeReplaceChildren  {
29+  @ JSExport 
30+  def  main (div : html.Div ):  Unit  =  {
31+  dom.document.replaceChildren()
32+  dom.document.replaceChildren(" " 
33+  dom.document.replaceChildren(div)
34+  dom.document.replaceChildren(" " 
35+  }
36+ }
37+ 
3138@ JSExportTopLevel (" ExampleElementStyle" 
3239object  ElementStyle  {
3340 @ JSExport 
@@ -123,7 +130,7 @@ object XMLHttpRequest{
123130 @ JSExport 
124131 def  main (pre : html.Pre ) =  {
125132 val  xhr  =  new  dom.XMLHttpRequest ()
126-  xhr.open(" GET"   
133+  xhr.open(" GET" 
127134 " https://www.boredapi.com/api/activity" 
128135 )
129136 xhr.onload =  { (e : dom.Event ) => 
                         You can’t perform that action at this time. 
           
                  
0 commit comments