本文整理汇总了Java中elemental2.dom.HTMLScriptElement类的典型用法代码示例。如果您正苦于以下问题:Java HTMLScriptElement类的具体用法?Java HTMLScriptElement怎么用?Java HTMLScriptElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
HTMLScriptElement类属于elemental2.dom包,在下文中一共展示了HTMLScriptElement类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: whenReady
import elemental2.dom.HTMLScriptElement; //导入依赖的package包/类
public static void whenReady(boolean debug, OnloadFn function){
HTMLScriptElement leafletScript = (HTMLScriptElement) DomGlobal.document.createElement("script");
if (debug) {
leafletScript.src = GWT.getModuleName() + "/leaflet/leaflet-src.js";
} else {
leafletScript.src = GWT.getModuleName() + "/leaflet/leaflet.js";
}
leafletScript.type="text/javascript";
HTMLLinkElement leafletStyle = (HTMLLinkElement) DomGlobal.document.createElement("link");
leafletStyle.href=GWT.getModuleName()+"/leaflet/leaflet.css";
leafletStyle.rel="stylesheet";
DomGlobal.document.head.appendChild(leafletScript);
DomGlobal.document.head.appendChild(leafletStyle);
leafletScript.onload = function;
}
示例2: ensureInjected
import elemental2.dom.HTMLScriptElement; //导入依赖的package包/类
static void ensureInjected()
{
if (isVueRouterInjected())
return;
HTMLScriptElement scriptElement =
(HTMLScriptElement) DomGlobal.document.createElement("script");
scriptElement.text = VUE_ROUTER_LIB;
DomGlobal.document.body.appendChild(scriptElement);
}
示例3: ensureInjected
import elemental2.dom.HTMLScriptElement; //导入依赖的package包/类
static void ensureInjected()
{
if (isVueLibInjected())
return;
HTMLScriptElement scriptElement =
(HTMLScriptElement) DomGlobal.document.createElement("script");
scriptElement.text = VUE_RUNTIME;
DomGlobal.document.body.appendChild(scriptElement);
}
示例4: ensureInjected
import elemental2.dom.HTMLScriptElement; //导入依赖的package包/类
static void ensureInjected()
{
if (isVueLibInjected())
return;
HTMLScriptElement scriptElement =
(HTMLScriptElement) DomGlobal.document.createElement("script");
scriptElement.text = VUE_DEV_RUNTIME;
DomGlobal.document.body.appendChild(scriptElement);
}
示例5: ensureInjected
import elemental2.dom.HTMLScriptElement; //导入依赖的package包/类
static void ensureInjected()
{
if (isCustomElementInjected())
return;
HTMLScriptElement scriptElement =
(HTMLScriptElement) DomGlobal.document.createElement("script");
scriptElement.text = VUE_CUSTOM_ELEMENT;
DomGlobal.document.body.appendChild(scriptElement);
}
示例6: captureVueObserver
import elemental2.dom.HTMLScriptElement; //导入依赖的package包/类
/**
* Capture the Vue Observer by creating a Vue Instance on the fly
*/
private void captureVueObserver()
{
HTMLScriptElement scriptElement =
(HTMLScriptElement) DomGlobal.document.createElement("script");
scriptElement.text =
"new Vue({created: function () {VueGWT.VueGWTObserverManager.get().customizeVueObserverPrototype(this.$data.__ob__.__proto__);}});";
DomGlobal.document.body.appendChild(scriptElement);
}
示例7: whenReady
import elemental2.dom.HTMLScriptElement; //导入依赖的package包/类
public static void whenReady(OnloadFn function){
HTMLScriptElement leafletScript = (HTMLScriptElement) DomGlobal.document.createElement("script");
leafletScript.src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0/leaflet.js";
leafletScript.type="text/javascript";
DomGlobal.document.head.appendChild(leafletScript);
leafletScript.onload = function;
}