-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chrome: konva tab missing #92
Comments
Thank you for your contribution. We will check and reply to you as soon as possible. |
Hey @maitrungduc1410 - I'm using Konva 9.3.0 All the links you provided work for me. Re-openeing the dev tools does not in my application. Is the problem maybe that the konva is not on the first screen? You have to navigate into the page where it appears first |
there's an interval runs every 1 second: const detectFromDevtoolInterval = setInterval(detectFromDevtool, 1000); it'll check if Konva is detected on current browser window and show what I recommend is: when you know Konva is actually on a page, then open (or reopen) the browser devtool (I do this for other extensions also: React, Vue,...) In your case: konva is not in first screen, then in second screen where you know it actually is -> open browser devtool |
Doesn't work for me 😕 |
In your case , is it like:
And it's SPA right? React? |
Specificly it is an Ionic + Angular application. I open a modal which is a to the dom attached element. Inside this element i navigate to another internal page, there is the konva |
Is it in iframe? |
No |
Oh, it's webcomponent right? In this case it has its own DOM (shadowDOM) it's very hard (but possible) for my dev tool to know if Konva is presented inside your component (since you can create any web component, div/span/.... also web component) |
The Ionic components use shadow dom, yes but my component should be in the light dom anyways 🤔 I will try to prepare a small reproducion in the next days when i found the time, when this is okay for you. Then we can check if the shadow dom is the problem |
Yeah, it'll be much easier for me to debug if you can provide reproducible example :) |
Hey @maitrungduc1410 - just switched to my main account^^ i created a reproducible repo here: https://github.com/EinfachHans/ionic-konva-inspector-bug You can start it with |
I'll check and get back to you |
Hi @EinfachHans, I checked your example In both cases Konva stage is rendered inside ShadowDOM: ![]() |
I tried with no ShadowDOM, and still doesn't work: ![]() I figured out that, in your global Konva object, it's very limited, has just few props, and one thing important is it doesn't have ![]() |
1 thing I need to correct after review my code, my dev tools works regardless of whether it's ShadowDOM or not, it works universally. My explanation yesterday was incorrect :) |
In case you don't want to change the import styles then you can do this: import { stages } from 'konva/lib/Stage';
import { Util } from 'konva/lib/Util';
// do this once before you initialize your Stage, from anywhere in your app
(window as any).Konva.stages = stages;
(window as any).Konva.Util = Util; Then you can keep your code as it is, no change: import { Stage } from 'konva/lib/Stage';
import { Layer } from 'konva/lib/Layer';
import { Circle } from 'konva/lib/shapes/Circle';
const stage = new Stage({
container: 'container-home',
width: 300,
height: 300,
});
const layer = new Layer();
stage.add(layer);
const circle = new Circle({
x: 150,
y: 150,
width: 300,
height: 300,
fill: 'blue',
}); |
Thank you for your dive-in, i made it work with this! Thanks a lot, you made an awesome tool! 😊 |
Describe the bug
A clear and concise description of what the bug is.
I'm currently trying to make this inspector work in chrome. I installed the extension, relaunched chrome and start my konva app.
When i press on the extension it says that konva is detected:
But there is no konva tab in my dev tools:

Am i missing something?
The text was updated successfully, but these errors were encountered: