File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- const CSS = ' position:absolute;left:0;top:-100%;width:100%;height:100%;margin:1px 0 0;border:none;opacity:0;pointer-events:none;' ;
1
+ const CSS = ` position:absolute;left:0;top:-100%;width:100%;height:100%;margin:1px 0 0;border:none;opacity:0;pointer-events:none;` ;
2
2
3
3
export default ( element , handler ) => {
4
- let frame = document . createElement ( 'iframe' ) ;
5
- let supportsPE = document . documentMode < 11 ? false : 'pointerEvents' in frame . style ;
4
+ const frame = document . createElement ( 'iframe' ) ;
5
+ const supportsPE = document . documentMode < 11 && 'pointerEvents' in frame . style ;
6
6
7
- frame . style . cssText = supportsPE ? CSS : CSS + 'visibility:hidden;' ;
7
+ frame . style . cssText = ` ${ CSS } ${ supportsPE ? '' : 'visibility:hidden;' } ` ;
8
8
frame . onload = ( ) => {
9
9
frame . contentWindow . onresize = ( ) => {
10
10
handler ( element ) ;
11
11
} ;
12
12
} ;
13
13
element . appendChild ( frame ) ;
14
14
return frame ;
15
- }
15
+ } ;
Original file line number Diff line number Diff line change 32
32
"devDependencies" : {
33
33
"eslint" : " ^4.19.1" ,
34
34
"eslint-config-developit" : " ^1.1.1" ,
35
- "microbundle" : " ^0.6 .0"
35
+ "microbundle" : " ^0.11 .0"
36
36
}
37
37
}
You can’t perform that action at this time.
0 commit comments