Name

JSObject.setMember( ): set a property of a JavaScript object — Java method in Java plug-in

Synopsis

public void setMember(Stringname, Object value)

Arguments

name

The name of the property to be set in the JSObject.

value

The value to which the named property should be set.

Description

The setMember( ) method of the Java JSObject class sets the value of a named property of a JavaScript object from Java. The specified value may be any Java Object. Primitive Java values may not be passed to this method. In JavaScript, the specified value is accessible as a JavaObject object.

Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.