How to protect js from custom events
问题 I am writing a game on Javascript with canvas and easeljs and I wonder if there are any ways to protect it. For example, I use stage.Addchild(index) to add a new object to the stage. Simply editing DOM I can attatch new event handler and fire it, something like <body onclick="stage.removeChild(0)"> and this will remove all the stage objects one by one. I was thinking to filter all the coming events and check what had fired it. But I am not sure how to do that and there may be better ways to