Skip to content

Switch to Object.defineProperty (probably breaking change) #15

@PlasmaPower

Description

@PlasmaPower

MDN states about __defineGetter__ and __defineSetter__:

This method should not be used since better alternatives exist.

In this case, the better alternative would be Object.defineProperty. However, using this probably be a breaking change since defineProperty cannot easily be used to add a setter to something with currently only a getter. Doing that would mean recreating the property, which isn't exactly a clean solution. In addition, a property can be set to be not configurable, which means that that wouldn't work. I'd prefer not to add code to recreate the property to node-delegate.

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