File tree Expand file tree Collapse file tree 4 files changed +42
-34
lines changed Expand file tree Collapse file tree 4 files changed +42
-34
lines changed Original file line number Diff line number Diff line change 1766
1766
// Keep track of nested call to loadFrame.
1767
1767
updateAreLoading ( this , 1 ) ;
1768
1768
1769
+ // Hide iframe content while loading.
1770
+ iframe . style . visibility = 'hidden' ;
1771
+
1769
1772
// Add the onLoad event listener:
1770
1773
if ( ! loadCache || ! frameReady ) {
1771
1774
onLoad ( iframe , function ( ) {
2950
2953
2951
2954
/**
2952
2955
* # listeners
2953
- * Copyright(c) 2015 Stefano Balietti
2956
+ * Copyright(c) 2021 Stefano Balietti
2954
2957
* MIT Licensed
2955
2958
*
2956
2959
* GameWindow listeners
2961
2964
2962
2965
"use strict" ;
2963
2966
2964
- var J = node . JSUS ;
2965
-
2966
- function getElement ( idOrObj , prefix ) {
2967
- var el ;
2968
- if ( 'string' === typeof idOrObj ) {
2969
- el = W . getElementById ( idOrObj ) ;
2970
- }
2971
- else if ( J . isElement ( idOrObj ) ) {
2972
- el = idOrObj ;
2973
- }
2974
- else {
2975
- throw new TypeError ( prefix + ': idOrObj must be string ' +
2976
- ' or HTML Element.' ) ;
2977
- }
2978
- return el ;
2979
- }
2967
+ // var J = node.JSUS;
2968
+
2969
+ // function getElement(idOrObj, prefix) {
2970
+ // var el;
2971
+ // if ('string' === typeof idOrObj) {
2972
+ // el = W.getElementById(idOrObj);
2973
+ // }
2974
+ // else if (J.isElement(idOrObj)) {
2975
+ // el = idOrObj;
2976
+ // }
2977
+ // else {
2978
+ // throw new TypeError(prefix + ': idOrObj must be string ' +
2979
+ // ' or HTML Element.');
2980
+ // }
2981
+ // return el;
2982
+ // }
2980
2983
2981
2984
var GameWindow = node . GameWindow ;
2982
2985
Original file line number Diff line number Diff line change 1766
1766
// Keep track of nested call to loadFrame.
1767
1767
updateAreLoading ( this , 1 ) ;
1768
1768
1769
+ // Hide iframe content while loading.
1770
+ // This way if the page is manipulated in the step callback,
1771
+ // the user still sees it appearing all at once.
1772
+ iframe . style . visibility = 'hidden' ;
1773
+
1769
1774
// Add the onLoad event listener:
1770
1775
if ( ! loadCache || ! frameReady ) {
1771
1776
onLoad ( iframe , function ( ) {
Original file line number Diff line number Diff line change 1
1
/**
2
2
* # listeners
3
- * Copyright(c) 2015 Stefano Balietti
3
+ * Copyright(c) 2021 Stefano Balietti
4
4
* MIT Licensed
5
5
*
6
6
* GameWindow listeners
11
11
12
12
"use strict" ;
13
13
14
- var J = node . JSUS ;
14
+ // var J = node.JSUS;
15
15
16
- function getElement ( idOrObj , prefix ) {
17
- var el ;
18
- if ( 'string' === typeof idOrObj ) {
19
- el = W . getElementById ( idOrObj ) ;
20
- }
21
- else if ( J . isElement ( idOrObj ) ) {
22
- el = idOrObj ;
23
- }
24
- else {
25
- throw new TypeError ( prefix + ': idOrObj must be string ' +
26
- ' or HTML Element.' ) ;
27
- }
28
- return el ;
29
- }
16
+ // function getElement(idOrObj, prefix) {
17
+ // var el;
18
+ // if ('string' === typeof idOrObj) {
19
+ // el = W.getElementById(idOrObj);
20
+ // }
21
+ // else if (J.isElement(idOrObj)) {
22
+ // el = idOrObj;
23
+ // }
24
+ // else {
25
+ // throw new TypeError(prefix + ': idOrObj must be string ' +
26
+ // ' or HTML Element.');
27
+ // }
28
+ // return el;
29
+ // }
30
30
31
31
var GameWindow = node . GameWindow ;
32
32
You can’t perform that action at this time.
0 commit comments