Hey,
Thank you for your response :)
I found a better way to catch if a block is already in the workspace.
In my opinions this topic may be closed.
(for the interested ones:
var items = Object.values(workspace.blockDB_);
Here the variable contains an Array with all blocks inside the workspace)
To your question(s):
a) I'm not sure if it is Blockly or my code. As I first encountered this problem, I thought the events are fired by the elements which are there (a deleted element can not fire anything anymore) and not of the lement which is the "center of attention", if you know what I mean.
b) My 'purpose':
I don't use blockly the way it is intended ^^"
Actually I want to use it to help people "building" their website and the blocks are the elements inside the website (like logo and stuff).
So i don't think it is necessary which type I use, because this is only an identifier.
The reason for this is, that there is no way a website should have 2 navigation bars at the top.
In the end I want to extract a Json Object which cointains all the settings for the website.
Now I have another problem with my code, but this does not belong in this topic I guess.
Thank you very much for helping anyways :)
Regards,
Becca