Commands
Commands are instructions issued by the parent window to the iframed flipbook. Commands can be invoked by calling magic methods, which can be accessed directly from the API instance.
Last updated
// Disable opening of shop basket AND adding shop items
iPaperAPI.updateEventSettings({
onBasketClick: { preventDefault: true },
onItemAdd: { preventDefault: true }
});iPaperAPI.goToPage(4);iPaperAPI.goToPreviousPage();iPaperAPI.goToNextPage();iPaperAPI.addItem({
title: 'My product',
description: 'Product description',
productID: 'PROD-25B',
price: '29.95',
originPage: 6,
quantity: 1
});iPaperAPI.trigger('goToPage', 4);