Skip to content

Treebeard constructor is unintuitive #75

@sloria

Description

@sloria

The Treebeard constructor/intializer function, runTB is a bit unintuitive because it doesn't really return a new Treebeard instance; intstead, it returns a mithril module: https://github.com/caneruguz/treebeard/blob/93ff6df2f4e230db33736eb1850de4e471daa5db/scripts/grid.js#L2406

This leads to a number of "gotchas":

var treebeard = new Treebeard({...});
console.log(treebeard.options);  // ERROR

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