document.register -> document.registerElement
include discardChanges
Add support for attached/detachedCallbacks; users can now implement attached/detached; in addition, entered/leftView remain available for bc.