-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathJSNI.java
34 lines (28 loc) · 957 Bytes
/
JSNI.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class JSNI {
class Element {}
// this is a JSNI comment
public native void scrollTo1(Element elem) /*-{
elem.scrollIntoView(true);
}-*/;
// this is not a JSNI comment: method is not declared `native`
public void scrollTo2(Element elem) /*-{
elem.scrollIntoView(true);
}-*/ {}
// this is not a JSNI comment: comment must be part of the method definition
public native void scrollTo3(Element elem);
/*-{
elem.scrollIntoView(true);
}-*/
// this is not a JSNI comment: extra content
public native void scrollTo4(Element elem) /* hi -{
elem.scrollIntoView(true);
}-*/;
// this is not a JSNI comment: extra content
public native void scrollTo5(Element elem) /* -{
elem.scrollIntoView(true);
}- ho*/;
// this is not a JSNI comment: no closing delimiter
public native void scrollTo6(Element elem) /*-{
elem.scrollIntoView(true);
}*/;
}