Package Exports
- @bretkikehara/devtools-detect
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@bretkikehara/devtools-detect) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
devtools-detect
Utility to check if DevTools.
- Chrome DevTools
- Safari DevTools
- Firefox DevTools
- Opera DevTools
- Firebug
- Firebug Lite
How to use
import { isDevtoolsOpen } from '@bretkikehara/devtools-detect';
if (isDevtoolsOpen(window)) {
console.log('devtools is open!');
} else {
console.log('devtools is closed!');
}isDevtoolsOpen(window: Window, threshold: number = 160)
- window - Window variable to check.
- threshold - Screen dimension inner vs outer threshold.
Caveats
Firefox can't detect if devtools is open as an external window.
License
MIT © Bret K. Ikehara
"