views:

409

answers:

1

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

+1  A: 

Try it by accessing it as string:

public final native boolean getDelete()  /*-{ return this['delete']; }-*/;
Hilbrand
This is it ... every property can be accessed from a hash table.
Drejc