As the title says.
It would enable to create a lot of ‘plugin like’ code snippets which could interact in a safe way(update-proof) with current bubble elements.
For example it would be easy to create advanced menus from ready to use html templates.
It would be easy to create whole new level of widgets.
I believe hard part would be about to keep it smart and safe against running 3rd party js within browser so it could be limited to run ui limited workflows.