Commit 0033f774 authored by Robert Knight's avatar Robert Knight

Stop exporting the main annotation layer object as `window.annotator`

The main application object in the code which runs in the host page was
made visible to other code on the page as `window.annotator`.

This export existed for legacy reasons (the client's Annotator.js
heritage), is not part of the public API of the client and we do not
make any effort to avoid breaking changes to it between releases.
Removing this export should prevent third parties writing code which
depends on its interface.
parent 9099f077
...@@ -61,10 +61,9 @@ $.noConflict(true)(function() { ...@@ -61,10 +61,9 @@ $.noConflict(true)(function() {
config.pluginClasses = pluginClasses; config.pluginClasses = pluginClasses;
window.annotator = new Klass(document.body, config); var annotator = new Klass(document.body, config);
appLinkEl.addEventListener('destroy', function () { appLinkEl.addEventListener('destroy', function () {
appLinkEl.parentElement.removeChild(appLinkEl); appLinkEl.parentElement.removeChild(appLinkEl);
window.annotator.destroy(); annotator.destroy();
window.annotator = undefined;
}); });
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment