Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schibsted-tech-polska/gardr-plugin-host-options
Gardr plugin for passing initialization options from host into iframe
https://github.com/schibsted-tech-polska/gardr-plugin-host-options
Last synced: 3 days ago
JSON representation
Gardr plugin for passing initialization options from host into iframe
- Host: GitHub
- URL: https://github.com/schibsted-tech-polska/gardr-plugin-host-options
- Owner: Schibsted-Tech-Polska
- Created: 2014-10-14T09:12:32.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-14T09:14:24.000Z (about 10 years ago)
- Last Synced: 2023-07-31T12:08:24.314Z (over 1 year ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gardr Options Plugin (Host)
Gardr plugin to pass options object from host into ext.
## Install
```
npm install gardr-plugin-host-options --save
```## Bundle
In your host bundle file:
```javascript
var gardrHost = require('gardr-host');
var options = require('gardr-plugin-host-options');gardrHost.plugin(options);
module.exports = gardrHost;
```## Options
```sendOptions``` - boolean, enables/disables passing options into ext iframe.
## Example
```javascript
var gardr = gardrHost(...);
gardr.queue('ad', {
url: 'my-adserver.com/ad.js',
container: 'ad',
sendOptions: true,
...
});
```## Usage
Options (except for circular referencing objects, such as DOM elements) will be available in ext iframe under ```gardr.params.options```