Enables apps to resize their iframes.
Get the location of the current page of the host product.
Name | Type | Description |
---|---|---|
callback | function | function (location) {...} The callback to pass the location to. |
1 2 3
AP.getLocation(function(location){
alert(location);
});
Resize the iframe to a width and height.
Only content within an element with the class ac-content
is resized automatically.
Content without this identifier is sized according to the body
element, and
is not dynamically resized. The recommended DOM layout for your app is:
1 2 3 4 5 6 7 8
<div class="ac-content">
<p>Hello World</p>
<div id="your-id-here">
<p>App content goes here</p>
</div>
...this area reserved for the resize sensor divs
</div>
The resize sensor div is added on the iframe's load event.
Removing the ac-content
element after this, prevents resizing from working correctly.
This method cannot be used in dialogs.
Name | Type | Description |
---|---|---|
width | String | The desired width in pixels or percentage. |
height | String | The desired height in pixels or percentage. |
1
AP.resize('400','400');
Resize the iframe so that it takes up the entire page.
This method is only available for general page modules.
1
AP.sizeToParent();
Rate this page: