This repository was archived by the owner on Aug 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,7 @@ typings/
5959
6060# next.js build output
6161.next
62+
63+ # swap files
64+ * .swo
65+ * .swp
Original file line number Diff line number Diff line change 88 </ head >
99 < body style ="box-sizing: border-box; margin: 0 auto; max-width: 900px; padding: 50px; width: 100%; ">
1010 < div >
11- < json-schema-validator jsoneditor ="./node_modules/ jsoneditor " metaschema ="./json-schema-draft-04.json " schema ="./example-schema.json "> </ json-schema-validator >
11+ < json-schema-validator jsoneditor ="https://unpkg.com/ jsoneditor@5.25.0 " metaschema ="./json-schema-draft-04.json " schema ="./example-schema.json "> </ json-schema-validator >
1212 </ div >
1313 < script >
1414
2828 xhr . send ( '' ) ;
2929 }
3030
31- setTimeout ( function ( ) {
32- getText ( "./example-data.json" , function ( text ) {
33- document . querySelector ( "json-schema-validator" ) . editor . setText ( text ) ;
34- } )
35- } , 1000 ) ;
31+ getText ( "./example-data.json" , function ( text ) {
32+ var intervalID = setInterval ( function ( ) {
33+ var validator = document . querySelector ( "json-schema-validator" ) ;
34+ if ( validator . editor ) {
35+ console . log ( "validator.editor exists" ) ;
36+ validator . editor . setText ( text ) ;
37+ console . log ( "set text" ) ;
38+ clearInterval ( intervalID ) ;
39+ console . log ( "cleared interval" ) ;
40+ }
41+ } , 1000 ) ;
42+ } ) ;
3643 </ script >
3744 </ body >
38- </ html >
45+ </ html >
You can’t perform that action at this time.
0 commit comments