(width, height)
| 9466 | } |
| 9467 | |
| 9468 | function createRoot(width, height) { |
| 9469 | var domRoot = document.createElement('div'); |
| 9470 | |
| 9471 | // domRoot.onselectstart = returnFalse; // Avoid page selected |
| 9472 | domRoot.style.cssText = [ |
| 9473 | 'position:relative', |
| 9474 | // IOS13 safari probably has a compositing bug (z order of the canvas and the consequent |
| 9475 | // dom does not act as expected) when some of the parent dom has |
| 9476 | // `-webkit-overflow-scrolling: touch;` and the webpage is longer than one screen and |
| 9477 | // the canvas is not at the top part of the page. |
| 9478 | // Check `https://bugs.webkit.org/show_bug.cgi?id=203681` for more details. We remove |
| 9479 | // this `overflow:hidden` to avoid the bug. |
| 9480 | // 'overflow:hidden', |
| 9481 | 'width:' + width + 'px', |
| 9482 | 'height:' + height + 'px', |
| 9483 | 'padding:0', |
| 9484 | 'margin:0', |
| 9485 | 'border-width:0' |
| 9486 | ].join(';') + ';'; |
| 9487 | |
| 9488 | return domRoot; |
| 9489 | } |
| 9490 | |
| 9491 | |
| 9492 | /** |
no test coverage detected