I'm building a system that allows multiple third-party plugins/gadgets conforming to the system's API to be run simultaneously on the page.
- What is the best practice of securing or isolating these plugins from one another, aside from running them in separate iframes?
- Should I design the API so that data fields of these plugins are private (essentially, hidden in their constructor's scope) and can only be read using the appropriate methods, or this would be merely an illusion of security, since a malicious plugin author could overwrite the victim's getter methods in order to fool whatever code that uses those methods for something?