destroy()

Resets the tree.

Parameters

  • N/A

Returns

  • N/A

Examples

import Treeful from 'treeful';

window.onload = function() {
    Treeful.add('n1')
           .add('n2');
}

window.onunload = function() {
    Treeful.destroy();
}

Tip 1: Notice your Treeful instance is still alive with a root node. You can re-create your tree even after it is destroyed.

import Treeful from 'treeful';

Treeful.add('n1');

Treeful.destroy();

Treeful.add('n1');

results matching ""

    No results matching ""