diff --git a/docs/API/App.md b/docs/API/App.md index 0dd26f6..cdd234b 100644 --- a/docs/API/App.md +++ b/docs/API/App.md @@ -25,12 +25,15 @@ var root = app.scenes.root('myScene'); The elements 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'); ``` -
+Retrieves an element by name: +```js +button = app.elements.byName('Button'); +``` Creates element as a child of another: ```js @@ -38,15 +41,11 @@ var a = app.elements.create(root, 'Button'); var b = app.elements.create(a, 'Button', 'specific-id'); ``` -
- Creates elements from a vine, as a child of a: ```js var c = app.elements.createFromVine(a, ''); ``` -
- Destroys an element: ```js app.elements.destroy(button);