Last modified: 2014-10-06 10:17:02 UTC
Following the documentation[1] starting at ve.ui.Surface (from ve.instances[0]) one would go to #getContext and access .toolbar. But though that property is defined, it is set to null. I'm not sure why, but apparently our MediaWiki's init is instantiating its own and is only accessible from ve.init.mw.ViewPageTarget#toolbar (ve.init.mw.targets[0].toolbar). It probably shouldn't have to instantiate its own one, and certainly not make it inaccessible to the rest of VE. [1] https://doc.wikimedia.org/VisualEditor/master/#!/api/ve.ui.Surface
There used to be a .toolbar property because the context had its own (local) toolbar to show the contextual tools in. This has been replaced with ContextWidget (which isn't a toolbar) which groups ContextItemWidget (which aren't tools), and now there is no .toolbar property.