This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { RefObject, useEffect, useRef } from 'react'; | |
| function getScrollParent(node: HTMLElement | null): HTMLElement | null { | |
| const isElement = node instanceof HTMLElement; | |
| const overflowY = isElement && window.getComputedStyle(node).overflowY; | |
| const isScrollable = overflowY !== 'visible' && overflowY !== 'hidden'; | |
| if (!node) { | |
| return null; | |
| } else if (isScrollable && node.scrollHeight >= node.clientHeight) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function(console){ | |
| console.save = function(data, filename){ | |
| if(!data) { | |
| console.error('Console.save: No data') | |
| return; | |
| } | |
| if(!filename) filename = 'console.json' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const TIMEOUT_MS = 5000; | |
| const CHECK_INTERVAL_MS = 500; | |
| let startTime = Date.now(); | |
| const parseVersion = (versionStr) => { | |
| if (!versionStr) return null; | |
| const [main, pre] = versionStr.split('-'); | |
| const [major, minor, patch] = main.split('.').map(Number); | |
| let canaryVal = 0; |
OlderNewer