Skip to content

Schibsted-Tech-Polska/gardr-plugin-host-postscribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gardr Postscribe Plugin (Host)

Gardr plugin to enable content rendering with Postscribe. It takes script pointed at options.url and renders it into host page (no iframe) using Postscribe. Element chosen as Gardr container will be used to render a script.

Install

npm install gardr-plugin-host-postscribe --save

Using with gardr-plugin-ext-postscribe

gardr-plugin-ext-postscribe is an Ext plugin that allows to call replace action from inside of an iframe.

Bundle

In your host bundle file:

    var gardrHost = require('gardr-host');
    var postscribe = require('gardr-plugin-host-postscribe');

    gardrHost.plugin(postscribe);

    module.exports = gardrHost;

Options

postscribe - boolean, enables/disables Postscribe rendering.

postscribeOptions - object, options that will be passed to Postscribe.

Example

var gardr = gardrHost(...);
gardr.queue('ad', {
    url: 'my-adserver.com/ad.js',
    container: 'ad',
    postscribe: true,
    postscribeOptions: {
        done: function() {
            console.log('Ad rendered with Postscribe');
        }
    },
    ...
});

About

Plugin for Garðr allowing for switching ad rendering to postscribe.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published