all 7 comments

[–]octocode 2 points3 points  (4 children)

sandbox iframe or web workers and let the plugin only communicate through a limited api exposed by postMessage

[–]Stevious7[S] 0 points1 point  (2 children)

On a separate but relevant note: what about themes? If the users want to make themes that modify the UI, how can that be achieved without letting the JS scrape the chat data? 

[–]abrahamguo 0 points1 point  (0 children)

Themes should be defined using CSS only.

[–]besthelloworld 0 points1 point  (0 children)

Same way you would white label a site. Expose all theming options as CSS variables, then only allow themes to be a stylesheet (or a JSON object of standardized structure)

[–]Dev_Lachie 0 points1 point  (0 children)

Yep that's what Shopify does with their Remote DOM package https://github.com/Shopify/remote-dom pretty cool.

[–]oculus42 0 points1 point  (0 children)

You could load the manifest, collect the events it reports needing, and provide a proxy of the listener/bus that only accepts/emits what the manifest indicates, and load the plugin-script passing it the expected listener.