public JavaScriptObject inject() {
            final JavaScriptObject wnd = (window == null)
                    ? nativeDefaultWindow()
                    : window;
            assert wnd != null;
            final JavaScriptObject doc = nativeGetDocument(wnd);
            assert doc != null;
            final JavaScriptObject scriptElement = nativeMakeScriptElement(doc);
            assert scriptElement != null;
            nativeSetText(scriptElement, scriptBody);
            nativeAttachToHead(doc, scriptElement);
            if (removeTag) {
                nativeRemove(scriptElement);
            }
            return scriptElement;
        }
Injects a script into the DOM. The JavaScript is evaluated and will
be available immediately when this call returns.
<p>
By default, the script is installed in the same window that the GWT
code is installed in.

@return the script element created for the injection. Note that it
may be removed from the DOM.
stroom-core-client/src/main/java/stroom/dashboard/client/vis/MyScriptInjector.java