This doesn't mean that all of the integration needs to be independent (save dialog etc.) just the initialisation.
It used to be that the integration was only initialisation (instantiate the editor with the html document to edit, basically only up to a dozen lines of code) but it has become much more than that.
We need to separate integration and initialisation (initialisation will be part of the platform specific integration, but code-wise it should be the tip of the pyramid, not the bottom), so that our MediaWiki initialisation should be completely isolated so we can load it from the <head> and it will do only 2 things:
- Browser compatibility test (bug 50608)
- May depend on jQuery and a few plugins
- May not depend on any VE classes since those may break in our subset of supported browsers (compared to MediaWiki/jQuery)
- Perform our changes to the interface to avoid flash of "pre-init" state
- Edit tab (bug 50542)
- Edit section links (bug 50540)
- Handle setup/teardown of VE from either clicking an "Edit" link or by url query.