(e: Event)
| 134 | } |
| 135 | |
| 136 | function onResizeStart(e: Event): void { |
| 137 | // So we don't constantly call clearTimeout and setTimeout, keep track of the |
| 138 | // current timeout time and only reschedule the timer when it is getting close. |
| 139 | if (state.resizeTimeStamp <= e.timeStamp + 50) { |
| 140 | state.resizeTimeStamp = e.timeStamp + 150; |
| 141 | |
| 142 | window.clearTimeout(state.resizeTimeout); |
| 143 | state.resizeTimeout = window.setTimeout(onResizeEnd, 150); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | function onResizeEnd(): void { |
| 148 | let viewportMeta = getMetaValue('viewport'); |
no outgoing calls
no test coverage detected