gardr-plugin-host-remove
v0.3.8
Published
Gardr plugin that automatically removes iframes based on certain conditions
Readme
Gardr Iframe Remove Plugin
Gardr plugin to remove iframes from host based on certain conditions.
Install
npm install gardr-plugin-host-remove --saveBundle
In your host bundle file:
var gardrHost = require('gardr-host');
var remove = require('gardr-plugin-host-remove');
gardrHost.plugin(remove);
module.exports = 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 = gardrHost(...);
gardr.queue('ad', {
removeOnTimeout: true,
removeOnFailure: true,
removeBySize: {
minWidth: 1,
minHeight: 1
}
});