Documentation

AP

Utility methods that are available without requiring additional modules.

Methods

getLocation(callback)

Get the location of the current page of the host product.

Parameters:
Name Type Description
callback function

function (location) {...}

Example
AP.getLocation(function(location){
  alert(location);
});

resize(width, height)

Resize the iframe to a specified width and height.

Only content within an element with the class ac-content will be resized automatically. Content without this identifier is sized according to the body element, and will dynamically grow, but not shrink.

<div class="ac-content">
<p>Hello World</p>
</div>

Note that this method cannot be used in dialogs.

Parameters:
Name Type Description
width String

the desired width

height String

the desired height

sizeToParent(hideFooter)

Resize the iframe, so that it takes the entire page. Add-on may define to hide the footer using data-options.

Note that this method is only available for general page modules.

Parameters:
Name Type Description
hideFooter boolean

true if the footer is supposed to be hidden