Skip to content

Commit

Permalink
Small changes to make j2cl and closure happier with this lib
Browse files Browse the repository at this point in the history
  • Loading branch information
niloc132 authored and adrienbaron committed Jan 15, 2020
1 parent ea837c2 commit 6ed87c2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
@@ -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");
var superdevmode = goog.define("superdevmode", "off");
@@ -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) {};
Expand Up @@ -10,10 +10,13 @@ public class VueCustomElementType<T extends IsVueComponent> {

@JsOverlay
public final VueCustomElement<T> create() {
return createElement(this);
return VCE.createElement(this);
}

@JsMethod(namespace = "VueCustomElement")
private native static <T extends IsVueComponent> VueCustomElement<T> createElement(
VueCustomElementType<T> type);
@JsType(isNative = true, namespace = "<global>", name = "VueCustomElement")
private static final class VCE {
@JsMethod
private native static <T extends IsVueComponent> VueCustomElement<T> createElement(
VueCustomElementType<T> type);
}
}

0 comments on commit 6ed87c2

Please sign in to comment.