<juicy-iframe>
is a custom element that lets you stamp inline or external HTML into an iframe.
It also provides simple data binding, that works for native JS/HTML as well as for Polymer's dom-bind
.
Install the component using Bower:
$ bower install juicy-iframe --save
Or download as ZIP.
-
Import Web Components' polyfill, if needed:
<script src="bower_components/webcomponentsjs/webcomponents.js">
-
Import Custom Element:
<link rel="import" href="bower_components/juicy-iframe/juicy-iframe.html">
-
Start using it!
<template is="juicy-iframe" content="./your/partial.html"></template>
Attribute | Options | Default | Description |
---|---|---|---|
content |
String | "" |
Safe HTML code, or path (starts with / or ./ ) to partial to be loaded. |
model |
String or Object | undefined |
Data model to attach to stamped iframe. |
For detailed changelog, check Releases.
MIT