Gardr Iframe Remove Plugin
Gardr plugin to remove iframes from host based on certain conditions.
Install
npm install gardr-plugin-host-remove --save
Bundle
In your host bundle file:
var gardrHost = ; var remove = ; gardrHost; moduleexports = gardrHost;
Options
removeOnTimeout
- number, amount of miliseconds after which iframe will be removed if it doesn't respond to host.
removeOnFailure
- boolean, indicating wether iframe should be removed if it fails to render.
removeBySize
- object containing size threshold which if not met will result in iframe removal. Syntax:
removeBySize: minWidth: number minHeight: number
removeCallback
- function that will be called if item was removed. Recieves item as a parameter.
removeCheckDelay
- number, amount of miliseconds after which check will be performed (default: 0). Requires Send Size Plugin
Example
var gardr = ;gardr;