Parsoid/Extension registration interface
< Parsoid
See bug 53874.
In localsettings.js:
parsoidConfig.setNativeExtension('gallery', newGallery().getHandlers());
// with getHandlers() returning something like
// { tokenHandler: .., serializerHandler: ..}