当前位置: 首页>>代码示例>>Java>>正文


Java HTMLScriptElement类代码示例

本文整理汇总了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;
}
 
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:20,代码来源:LeafletResources.java

示例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);
}
 
开发者ID:Axellience,项目名称:vue-router-gwt,代码行数:11,代码来源:VueRouterLibInjector.java

示例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);
}
 
开发者ID:Axellience,项目名称:vue-gwt,代码行数:11,代码来源:VueLibInjector.java

示例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);
}
 
开发者ID:Axellience,项目名称:vue-gwt,代码行数:11,代码来源:VueLibDevInjector.java

示例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);
}
 
开发者ID:Axellience,项目名称:vue-gwt,代码行数:11,代码来源:VueCustomElementLibInjector.java

示例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);
}
 
开发者ID:Axellience,项目名称:vue-gwt,代码行数:12,代码来源:VueGWTObserverManager.java

示例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;
}
 
开发者ID:gwidgets,项目名称:gwty-leaflet,代码行数:8,代码来源:InjectedLeafletResources.java


注:本文中的elemental2.dom.HTMLScriptElement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。