mirror of https://github.com/artf/grapesjs.git
5 changed files with 54 additions and 1 deletions
@ -0,0 +1,40 @@ |
|||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> |
|||
|
|||
## getAllFrames |
|||
|
|||
Get all frames |
|||
|
|||
### Examples |
|||
|
|||
```javascript |
|||
const arrayOfFrames = page.getAllFrames(); |
|||
``` |
|||
|
|||
Returns **[Array][1]\<Frame>** |
|||
|
|||
## getMainFrame |
|||
|
|||
Get the first frame of the page (identified always as the main one) |
|||
|
|||
### Examples |
|||
|
|||
```javascript |
|||
const mainFrame = page.getMainFrame(); |
|||
``` |
|||
|
|||
Returns **Frame** |
|||
|
|||
## getMainComponent |
|||
|
|||
Get the root component (usually is the `wrapper` component) from the main frame |
|||
|
|||
### Examples |
|||
|
|||
```javascript |
|||
const rootComponent = page.getMainComponent(); |
|||
console.log(rootComponent.toHTML()); |
|||
``` |
|||
|
|||
Returns **Component** |
|||
|
|||
[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array |
|||
Loading…
Reference in new issue