Skip to content

this no longer references JavaScript object when implementing Java interface #2337

@omolenkamp

Description

@omolenkamp

When implementing a Java interface in JavaScript, this can no longer be used to reference the associated JavaScript object.

Example:

var supplier = new java.util.function.Supplier({
    value: "Test",
    supply: function() {
        return this.value;
    }
});

supplier.supply();

Rhino versions before 1.9.0 would return the string Test, but since 1.9.0, undefined is returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions