-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use same condition for popup page and devtool when detect Konva
- Loading branch information
1 parent
afe8694
commit 67ce36e
Showing
5 changed files
with
27 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import type Konva from "konva"; | ||
import type Konva from 'konva'; | ||
|
||
declare global { | ||
interface Window { | ||
Konva: typeof Konva; | ||
} | ||
} | ||
|
||
document.addEventListener("__KONVA_DEVTOOLS__DETECT_KONVA", function (e) { | ||
document.addEventListener('__KONVA_DEVTOOLS__DETECT_KONVA', function () { | ||
document.dispatchEvent( | ||
new CustomEvent("__KONVA_DEVTOOLS__DETECTION_RESULT", { | ||
detail: !!window.Konva, | ||
}) | ||
new CustomEvent('__KONVA_DEVTOOLS__DETECTION_RESULT', { | ||
detail: !!window.Konva && !!window.Konva.stages && !!window.Konva.Util, | ||
}), | ||
); | ||
}); |
This file contains 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