Git Product home page Git Product logo

gwt-api-generator's People

Contributors

amahdy avatar cwayfinder avatar jouni avatar manolo avatar saulis avatar tehapo avatar tomivirkki avatar vegegoku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gwt-api-generator's Issues

GWTPolymer Elements 1.7.0 : Polymer.setGwtBowerLocation(""); missing

Can you please help me with generating gwt widget out of my custom web component?
I tried using
@jstype(isNative=true)
public interface MyAppElement {

@JsOverlay public static final String TAG = "mba-app";

// @JsOverlay public static final String SRC = "my-app/mba-app.html";

@JsOverlay public static final String SRC = "my-app/mba-app.html";

}

but it is unable to find my html element.

Thanks,
Gaurav

Task to create and build a starter project

Seems like it's a very common use case to want some javascript wrapped and this should be easier.

Thinking of adding a gulp.task('starter', function(){... to gulp.js in order to create the kind of project you write about in the instructions. Namely: pom.xml, bowser.js and config for the generator.

I think that this should run off a single gwt-api-conf.js or similar and be able to generate a sample one if that doesn't exist, so you just have to fill that out.

A single file should have all the configuration needed to generate most wrapper projects.

Think I'll prototype something.

What do you think @manolo?

Generated namespaces is so complex

Everything related with a collection should be under it's unique namespace, right now there are a mess of namespaces because events go arbitrary to locations related with it's name instead of it's package.

Attached screenshots how it's currently and how it should be:

screen shot 2015-11-04 at 15 55 10

screen shot 2015-11-04 at 15 53 58

connects to vaadin/components-team-tasks#34

No handling for HTML element extension

An example of this is iron-form, which extends the default form element.

The generated IronForm widget doesn't function properly.
It specifies an <iron-form> tag instead of <form is="iron-form">

Moreover, the get/setAction and get/setMethod are not inherited.

POLYMER , Import href

When you're adding widgets on the fly programmatically for the first time (ex : new PaperButton x5 in a for)
the import is imported multiple time because the href is not fully loaded between each instanciation.
urlImported.add(href); should be added directly to avoid the issue.
Maybe remove it if the script fail to load ?

public static void importHref(String hrefOrTag, final Function ok, Function err) {
if (!hrefOrTag.startsWith("http")) {
// It's a tag
if (hrefOrTag.matches("[\w-]+")) {
hrefOrTag = hrefOrTag + "/" + hrefOrTag + ".html";
}
// It's not prefixed with the bower_components convention
if (!hrefOrTag.startsWith("bower_components")) {
hrefOrTag = "bower_components/" + hrefOrTag;
}
hrefOrTag = GWT.getModuleBaseForStaticFiles() + hrefOrTag;
}
if (!urlImported.contains(hrefOrTag)) {
final String href = hrefOrTag;
importHrefImpl(href, new Function() {
public Object call(Object arg) {
// Don't update the list until the import is actually loaded
urlImported.add(href);
if (ok != null) {
ok.call(arg);
}
return null;
}
}, err);
} else if (ok != null) {
ok.call(hrefOrTag);
}
}

Polymer clears the value of window.performance

In the Polymer class the performance field has been introduced:
here
which makes the previously not null performance undefined. This causes an exception for example in iron-list.html where the window.performance.now() is called without checking whether the performance has a value or not.

When a polymer element is already imported, importHref does not fire the ok function

In Polymer.java:

public static void importHref(String hrefOrTag, final Function ok, final Function err) {
    final String href = absoluteHref(hrefOrTag);
    if (!urlImported.contains(href)) {
        urlImported.add(href);
        whenPolymerLoaded(new Function() {
            public Object call(Object arg) {
                Base.importHref(href, ok, err);
                return null;
            }
        });
    }
}

The problem i see is that if urlImported already has the imported elements, the ok function is not fired, necessitating a manual check for the element (essentially isRegistered, which is private).

Or maybe i'm going about this all wrong. How do i know if a polymer element has been imported into gwt?

Can't generate proper function with return type

I'm trying to expose AppLocalizeBehavior's localize method by introducing a custom component that I want to use on the GWT side.

I added a simple function

translate: function (language, resources, formats) {
        return this.__computeLocalize(language, resources, formats);
}

or even a simpler case with

testreturn: function () {
        return "something";
    }

However the problem is the generated code still uses void

public void translate(Object e, Object o, Object n) {
        getPolymerElement().translate(e, o, n);
    }

What am I missing here?

Generated vaadin-grid can't seem to utilize getItem

Example code:

// Load 
grid.getPolymerElement().addEventListener(SelectedItemsChangedEvent.NAME, event -> {
    JsArrayNumber n = grid.getSelection().selected(null, 0, 200).cast();
    if (n.length() == 1) {
        grid.getItem(n.get(0), new Function<JavaScriptObject, Object>() {
            @Override
            public JavaScriptObject call(Object arg) {
                main.load(arg);
                return null;
            }
        }, false);
    }
});

The Object arg always seems to be null, regardless of which row is selected.

The issue seems to be that getItem() should take a function with two inputs (JSFunction2 in vaadin-grid's gwt code).
function (error, item) {}

Perhaps arg is simply the "error" input? (Which would make sense, as it should be null.)

There's not currently any way to easily get a specific row's data via the generated code.

Event parsing failure

Some event comments of the paper-drawer-panel generates invalid event classes.

  • paper-responsive-change
  • iron-select
  • iron-deselect

The problem seems the to be the hyphen at the end of the line of these comments:

* @event iron-select {{item: Object}} detail -
*     item: The panel that the event refers to.

Regards
BM

Generated GWT Widgets are not IsEditor

In GWT we have only the Editor framework which does a correct databinding between POJOs and Widgets.

I've tried with no success Errai Databinding, to simplistic for a complex interface.

Unfortunately generated widgets are Panels, and as such they don't implement IsEditor interface, which is what the Editor framework uses for integration between generated Autobeans and Wdgets.

I would like the generator to change how it works so that we obtain Widgets compatible with it.

In case I can contribute, but I need to know if you have any suggestions for this.

Thank you.

Polymer.dom(...).removeChild(...) does not exist

I'm able to add elements using Polymer.dom(parentElement).appendChild(childElement), but I'm not able to remove them as Polymer.dom(parentElement).removeChild is not a valid function.

Am I missing something?

Polymer is not initialized with polymer-bundler imports

We are using polymer-bundler to import all needed elements at once. Because of that the method named whenPolymerLoaded is never called in com.vaadin.polymer.Polymer so for example the Polymer & Base will be null although we might still want to use that class which is not possible without those references.

compilation failure

Since today, i've some errors while compiling
because package com.google.gwt.core.client.js does not exist anymore.

Allow generate java code from packages installed in bower_components

Right now it is mandatory to pass bower packages so as they are downloaded and installed before parsing them.

But it should be nice to allow parsing all packages installed by hand by the user in the current folder so as this simple procedure works:

 $ bower install gitusername/mypolymerelement
 $ gwt-api-generator

Vaadin/charts-component

Hi,
Is it possible to generate gwt-api for vaadin/charts-component ?
Because when I did it there is no error, but for example the VChart class is nearly empty.

Regards.

Dependency failure hydrolysis

Due to project rename of Hydrolysis to Polymer-Analyzer the dependency path has to be changed to:
"hydrolysis": "git://github.com/Polymer/polymer-analyzer#v1.22.0",

With the newest version (1.24.1) the generator does not work.

Ambiguous 'setSelected' on PaperMenu / PaperTabs / PaperListbox / PaperRadioGroup

The signature for the getter / setter of selected has been changed from Stringto Object
But there ist still a method setSelected(String) doing
getPolymerElement().setAttribute("selected", value);
instead of
getPolymerElement().setSelected(value);

This can cause wrong behave if the menu should have no selection with:
setSelected(null)

Not valid Java code for events.

With the gwt-api-generator I generated the source for PolymerElements:
gwt-api-generator --package=PolymerElements/paper-elements

After generating I tryied to compile it, but there was on some parts not valid Java code generaded. For example in the class IronOverlayClosedEvent.java on line 37:

@JsProperty JavaScriptObject getEvent.detail();

No pom file

g-10-64-12-198:tt amahdy$ gwt-api-generator --package=alexwolfe/Buttons --pom
[12:52:35] Using cwd:  /Users/amahdy/tt/src/main/resources//com/vaadin/polymer/public/
[12:52:35] Using bower dir:  ./bower_components
[12:52:35] bower not-cached git://github.com/alexwolfe/Buttons.git#*
[12:52:35] bower resolve git://github.com/alexwolfe/Buttons.git#*
[12:52:36] bower download https://github.com/alexwolfe/Buttons/archive/v2.0.0.tar.gz
[12:52:39] bower extract archive.tar.gz
[12:52:39] bower invalid-meta Buttons is missing "ignore" entry in bower.json
[12:52:39] bower resolved git://github.com/alexwolfe/Buttons.git#2.0.0
[12:52:39] bower install Buttons#2.0.0
g-10-64-12-198:tt amahdy$ ls -la
total 0
drwxr-xr-x   3 amahdy  staff   102 Dec 16 12:52 .
drwxr-xr-x+ 73 amahdy  staff  2482 Dec 16 12:38 ..
drwxr-xr-x   3 amahdy  staff   102 Dec 16 12:52 src

Polymer#saveProperties ruins Vaadin's connectorId handling

In Vaadin the tkPid is used to store the connectorId on an element but this has been removed when the saveProperties method is called. If a layout phase is in progress around these elements then Vaadin is not able to retrieve the corresponding Connector which leads to exceptions.

A possible solution could be that the saveProperties ignores the tkPid as well which is anyway a "final" property.

Add model.item to Event

Declarative event handlers inside a "dom-repeat" add the model object to the event. If we make the model available on the elemental.Event then it is possible to get the data from the item when an event is fired.

@JsType(isNative=true, namespace=GLOBAL)
public interface Event {
     ....

    @JsProperty TemplateInstance getModel();

    @JsType(isNative=true, namespace=GLOBAL)
    public interface TemplateInstance {
        @JsProperty <T> T getItem();
    }
}

Example:
So if the "dom-repeat" template contains an event handler (a.e. <paper-button on-tap="onTapFct">) then we get the binded data on each event.

Polymer.function(bindTemplate, "onTapFct", event -> {
    Foo foo = ((Event) event).getModel().getItem();
});

final List<Foo> data = createData();
repeatTemplate.setItems(Polymer.asJsArray(data));

Compilation errors on the generated code.

I installed following Polymer components

"dependencies": {
"google-drive": "GoogleWebcomponents/google-drive#^1.0.1",
"google-apis": "GoogleWebcomponents/google-apis#^1.1.5",
"google-signin": "GoogleWebcomponents/google-signin#^1.3.3",
"vaadin-grid": "vaadin/vaadin-grid#1.0.0",
"vaadin-combo-box": "vaadin/vaadin-combo-box#1.0.0",
"paper-elements": "PolymerElements/paper-elements#^1.0.7",
"iron-elements": "PolymerElements/iron-elements#^1.0.10",
"neon-elements": "PolymerElements/neon-elements#^1.0.0",
"vaadin-icons": "vaadin/vaadin-icons#1.0.0"
}

gwt-api-generator --pom
mvn package

bunch of errors ...

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.EventHandler.java:[13,80] '{' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.EventHandler.java:[15,74] '(' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.EventHandler.java:[15,150] = expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[23,80] '{' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/PaperButton.java:[574,97] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/PaperButton.java:[574,98] invalid method declaration; return type required
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[19,76] '{' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[19,162] > expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[19,175] '(' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[21,5] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[21,12] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[21,23] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[21,101] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[21,106] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[21,107] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[21,116] not a statement
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[21,193] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[22,107] not a statement
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[22,112] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[22,188] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[25,5] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[25,82] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[28,5] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[28,111] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[32,5] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[32,15] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[32,28] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[32,112] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[33,82] <identifier> expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[36,5] illegal start of expression
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[36,127] ';' expected
[ERROR] /home/koen/workspace/asics/gwt-api-generator/src/main/java/com/vaadin/polymer/paper/widget/event/TransitionendEventparamnodeObjectdetailContainstheanimatednode.Event.java:[41,2] reached end of file while parsing
[INFO] 32 errors 

Can't find symbol JsArray when trying to build google-chart

I'm trying to use the generator to build google-chart:
https://github.com/GoogleWebComponents/google-chart

The error:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/vgpe/src/main/java/com/vaadin/polymer/google/widget/event/GoogleChartSelectEvent.java:[46,12] cannot find symbol
  symbol:   class JsArray
  location: class com.vaadin.polymer.google.widget.event.GoogleChartSelectEvent
[ERROR] /D:/vgpe/src/main/java/com/vaadin/polymer/google/event/GoogleChartSelectEvent.java:[37,21] cannot find symbol
  symbol:   class JsArray
  location: interface com.vaadin.polymer.google.event.GoogleChartSelectEvent.Detail
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.417 s
[INFO] Finished at: 2016-01-25T11:39:03-05:00
[INFO] Final Memory: 21M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project vaadin-gwt-polymer-elements: Compilation failure: Compilation failure:
[ERROR] /D:/vgpe/src/main/java/com/vaadin/polymer/google/widget/event/GoogleChartSelectEvent.java:[46,12] cannot find symbol
[ERROR] symbol:   class JsArray
[ERROR] location: class com.vaadin.polymer.google.widget.event.GoogleChartSelectEvent
[ERROR] /D:/vgpe/src/main/java/com/vaadin/polymer/google/event/GoogleChartSelectEvent.java:[37,21] cannot find symbol
[ERROR] symbol:   class JsArray
[ERROR] location: interface com.vaadin.polymer.google.event.GoogleChartSelectEvent.Detail
[ERROR] -> [Help 1]
[ERROR]

Polymer (2.0) + GWT => Stock of the situation ? Coming GWT 3 soon or not ? What is the right way for a LTS application ?

Hi, This is not an issue ... maybe a brainstorming discussion ;)
There is a while from now that I'm looking for the best and long term approach to integrate Polymer with GWT.

I used a lot GWT 2.5 and 2.6 for b2b projects in the past. I followed GWT evolutions, GWT3.0 anticipation projects like The Herald Pehl (from Red Hat) conference at the GWTcon 2016 and WebComponents and Polymer integration initiatives like WeTheInternet/gwtc, and this awesome gwt-api-generator which can be a really source of inspiration.
But I have to confess that, due to many reasons (Obscure GWT roadmap, HTML5 APIs evolutions and too much partials support), I was sure that many of theses initiatives would be deprecated quickly.
And I understand developers and companies reviewing their point of view on GWT usage because of the lacks (for me) of a strong LTS right way and manner to evolve with GWT today.

I'm always convinced by GWT for middle and strong LTS projects. Java8, J2CL, enhance that. And I'm sure that a combination based on the couple GWT/Polymer is the right way for a reliable and new generation UI application. The Polymer project make the exclusion of the widgets API out of GWT a really good thing for UIs.

But for now what is the situation ? If we want to start a development today, what is the right way to proceed for Polymer integration ?
It is mentioned in the README.md that "Vaadin no longer provides support (...) We took this decision because once demonstrated that polymer elements could be easily be integrated in GWT".
Yes It's true. But I did not find on the web any prettier or better alternatives to integrate and manipulate easily Polymer Elements from a GWT application.

So today, If we want to be GWT3 pseudo-compliant (no UiBinder) with a UI based on Polymer 2.0, and builds based or more recent build tools (migration from bower to npm or yarn) what we can use for a LTS GWT app ?

Does we have to continue integration of the gwt-api-generator ? What is the status for Polymer 2.0 ?
Does an API generator stays a good solution for future (due to the elements quantity and the different cases to manage) ?
Do you think that create a fork or start a from scratch project based on elemental2 (in beta at this time) would be a good idea ?

Or, in the state of things and taking into account the Polymer Elements evolution philosophy, does the idea of keeping out Polymer 2.0 (static import) from a GWT app and just communicate through a JSInterop API with separated or combined toolchains would be THE solution to have a reliable application, to avoid DRY code, and keep UI detach from the core of an app ?

Thanks for your advises.

Allow behavior objects in arguments

We need a way to pass interfaces from java to javascript and viceversa.

We can use Polymer behavior syntax to generate JsInterop type interfaces and then check those in method arguments and return types

Volunteer collaborators are needed

We are looking for collaborators to work on this project. If you want to become a collaborator, please leave a comment below.

Collaborator responsibilities include:

  • Responding to issues
  • Reviewing and merging pull requests
  • Development contributions: add features, fix bugs

wrong SRC path in generated Java files

Having several polymer components that extend each other in the same folder, the TAG and SRC string do get mixed up:

example i have the following hirachy a folder bower_components/payolution-date-picker:

  • i have a custom date picker element called payolution-birthday-date-picker which inherits
  • a payolution-date-picker element which again inherits three other custom sub elements

the public static final String SRC of all generated java classes point to payolution-date-picker/payolution-birthday-datepicker.html

Depend directly on Elemental2

My problem is that because the existingJsArray is defined as JsArray<T extends JavaScriptObject> extends JavaScriptObject, it is enforcing too harsh a restriction the items stored in the array. I don't want to define my class as extending JavaScriptObject as this is a deprecated API and would prefer my @JsType annotated classes not to have all the restrictions imposed by the compiler.

I propose creating a JsArrayNative type that is included in this generator project which would work as an expected javascript array without any of the restrictions of JsArray. I didn't want to just go ahead and create this and submit a pull request if this is not the preferred approach of dealing with this. Obviously this would be a breaking API change to the generator.

What are your thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.