Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docs/API/App.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,27 @@ var root = app.scenes.root('myScene');

The <code>elements</code> object can be used to query all scenes for an element, create elements, or destroy them.

Retrieves element:
Retrieves an element by its id:
```js
button = app.elements.byId('specific-id');
```

<br>
Retrieves an element by name:
```js
button = app.elements.byName('Button');
```

Creates element as a child of another:
```js
var a = app.elements.create(root, 'Button');
var b = app.elements.create(a, 'Button', 'specific-id');
```

<br>

Creates elements from a vine, as a child of <code>a</code>:
```js
var c = app.elements.createFromVine(a, '<Menu><Button /></Menu>');
```

<br>

Destroys an element:
```js
app.elements.destroy(button);
Expand Down