diff --git a/core/src/main/java/com/axellience/vuegwt/core/client/VueGWT.js b/core/src/main/java/com/axellience/vuegwt/core/client/VueGWT.js index f9870433..514a7c61 100644 --- a/core/src/main/java/com/axellience/vuegwt/core/client/VueGWT.js +++ b/core/src/main/java/com/axellience/vuegwt/core/client/VueGWT.js @@ -1,7 +1,7 @@ goog.provide("vuegwt"); /** @define {string} */ -goog.define("vuegwt.environment", "production"); +vuegwt.environment = goog.define("vuegwt.environment", "production"); /** @define {string} */ -goog.define("superdevmode", "off"); \ No newline at end of file +var superdevmode = goog.define("superdevmode", "off"); \ No newline at end of file diff --git a/core/src/main/java/com/axellience/vuegwt/core/client/customelement/VueCustomElement.js b/core/src/main/java/com/axellience/vuegwt/core/client/customelement/VueCustomElement.js new file mode 100644 index 00000000..f5f5b068 --- /dev/null +++ b/core/src/main/java/com/axellience/vuegwt/core/client/customelement/VueCustomElement.js @@ -0,0 +1,21 @@ +/** + * @externs + */ +var VueCustomElement = {}; +/** + * + * @param {Object} param + * @return {Element} + */ +VueCustomElement.createElement = function(param) {}; + +/** + * @type {Object} + */ +Element.prototype.__vue_custom_element__; + +/** + * @param {Object} param + * @return {Function} + */ +Function.prototype.extend = function(param) {}; \ No newline at end of file diff --git a/core/src/main/java/com/axellience/vuegwt/core/client/customelement/VueCustomElementType.java b/core/src/main/java/com/axellience/vuegwt/core/client/customelement/VueCustomElementType.java index b2f258b4..953986d0 100644 --- a/core/src/main/java/com/axellience/vuegwt/core/client/customelement/VueCustomElementType.java +++ b/core/src/main/java/com/axellience/vuegwt/core/client/customelement/VueCustomElementType.java @@ -10,10 +10,13 @@ public class VueCustomElementType { @JsOverlay public final VueCustomElement create() { - return createElement(this); + return VCE.createElement(this); } - @JsMethod(namespace = "VueCustomElement") - private native static VueCustomElement createElement( - VueCustomElementType type); + @JsType(isNative = true, namespace = "", name = "VueCustomElement") + private static final class VCE { + @JsMethod + private native static VueCustomElement createElement( + VueCustomElementType type); + } }