This is demo 3 for Photopea Live Messaging API To detect, if a smart object was loaded we check the number of layers with a script ever 50ms.