Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT JavaScriptObject reading "delete" property

I have the following native method in a extended JavaScriptObject class:

public final native boolean getDelete()  /*-{ return this.delete; }-*/;

but this apparently doesn't work as "delete" is an javascript operator.

How can I read this property correctly.

The thrown exception is:

com.google.gwt.dev.js.JsParserException: missing name after . operator

like image 905
Drejc Avatar asked Dec 05 '25 15:12

Drejc


1 Answers

Try it by accessing it as string:

public final native boolean getDelete()  /*-{ return this['delete']; }-*/;
like image 173
Hilbrand Bouwkamp Avatar answered Dec 08 '25 15:12

Hilbrand Bouwkamp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!