What do you mean? I don't see any ID setting on layout or layer properties.
If you mean just to give names to layout or each layer, i test this, no working.
To understand more, I use a ".js" file and write this:
"document.getElementById("")........."
So with a button object i test, works fine.
But can't made the same thing with objects like text, sprite, etc.
Imagine to control color, opacity, even replace images in sprites via javascript.
Make sense? Can work what i need or not?
Or need to edit plugins for personal purpose and add id code inside?
I don't know, just thoughts..
Thanks!