Skip to content

Inherit from javascript function #38

@lcnvdl

Description

@lcnvdl

Hi! I'm using jsface for the new objects of my project, but I have a lot of "legacy objects", like:

var Robot = function() {

    this.getRotation = function() { return 0; }

};

I'm trying to create a child of Robot using jsface, like:

var RobotChild = Class(Robot, function() {
    return {
    };
});

But, when I do:

var robot = new RobotChild();

I get an empty instance.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions