mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
11 lines
439 B
TypeScript
11 lines
439 B
TypeScript
// check if it's open
|
|
console.log('is DevTools open?', window.devtools.open);
|
|
// check it's orientation, null if not open
|
|
console.log('and DevTools orientation?', window.devtools.orientation);
|
|
|
|
// get notified when it's opened/closed or orientation changes
|
|
window.addEventListener('devtoolschange', function (e) {
|
|
console.log('is DevTools open?', e.detail.open);
|
|
console.log('and DevTools orientation?', e.detail.orientation);
|
|
});
|