fixed tying for NodeListOf

This commit is contained in:
Renaud Pawlak 2017-05-17 09:15:33 +02:00
parent fb3ed64482
commit 90e35a7931
4 changed files with 12 additions and 16 deletions

View File

@ -1,12 +1,9 @@
package def.dom;
public class NodeList extends def.js.Object implements Iterable<Node> {
public double length;
native public Node item(double index);
native public Node $get(double index);
public class NodeList extends def.js.Object {
public int length;
native public Node item(int index);
native public Node $get(int index);
public static NodeList prototype;
public NodeList(){}
/** From Iterable, to allow foreach loop (do not use directly). */
@jsweet.lang.Erased
native public java.util.Iterator<Node> iterator();
}

View File

@ -1,6 +1,8 @@
package def.dom;
@jsweet.lang.Interface
public abstract class NodeListOf<TNode extends Node> extends NodeList {
public abstract class NodeListOf<TNode extends Node> extends NodeList implements Iterable<TNode> {
public double length;
native public TNode item(int index);
native public TNode $get(int index);
}

View File

@ -1,16 +1,10 @@
package def.dom;
import def.js.Iterable;
@jsweet.lang.SyntacticIterable
public class NodeList extends Iterable<Node> implements java.lang.Iterable<Node> {
public class NodeList {
public double length;
native public Node item(double index);
native public Node $get(double index);
public static NodeList prototype;
public NodeList(){}
/** From Iterable, to allow foreach loop (do not use directly). */
@jsweet.lang.Erased
native public java.util.Iterator<Node> iterator();
}

View File

@ -1,6 +1,9 @@
package def.dom;
@jsweet.lang.Interface
public abstract class NodeListOf<TNode extends Node> extends NodeList {
public abstract class NodeListOf<TNode extends Node> extends NodeList implements Iterable<TNode> {
public double length;
native public TNode item(int index);
native public TNode $get(int index);
}