This repository was archived by the owner on Jan 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change 73
73
</ template >
74
74
</ body >
75
75
< script >
76
- function select ( lang ) {
77
- var myscriptTextWebElement = document . querySelector ( 'myscript-text-web' ) ;
76
+ window . addEventListener ( "load" , function ( event ) {
77
+ function select ( lang ) {
78
+ var myscriptTextWebElement = document . querySelector ( 'myscript-text-web' ) ;
79
+
80
+ myscriptTextWebElement . unloaded = true ;
81
+ myscriptTextWebElement . language = lang ;
82
+ myscriptTextWebElement . unloaded = false ;
83
+ }
78
84
79
- myscriptTextWebElement . unloaded = true ;
80
- myscriptTextWebElement . language = lang ;
81
- myscriptTextWebElement . unloaded = false ;
82
- }
83
- ( function ( document ) {
84
- 'use strict' ;
85
85
var template = document . querySelector ( '#app' ) ;
86
86
template . addEventListener ( 'template-bound' , function ( ) {
87
87
console . log ( 'Our app is ready to rock!' ) ;
97
97
var waitingDiv = document . querySelector ( '#waiting' ) ;
98
98
waitingDiv . parentNode . removeChild ( waitingDiv ) ;
99
99
console . log ( "All resources finished loading! Starting to init myscript-text-web" ) ;
100
- var myscriptTextWebElement = document . querySelector ( 'myscript-text-web' ) ;
101
- myscriptTextWebElement . language = 'fr_FR' ;
102
- myscriptTextWebElement . unloaded = false ;
100
+ select ( 'fr_FR' ) ;
103
101
console . log ( "myscript-text-web should be displayed" ) ;
104
102
} , 3000 ) ;
105
103
} ) ;
106
-
107
- } ) ( document ) ;
104
+ } ) ;
108
105
</ script >
109
106
</ html >
You can’t perform that action at this time.
0 commit comments