UNPKG

assetgraph

Version:

An auto discovery dependency graph based optimization framework for web pages and applications

19 lines (14 loc) 405 B
const HtmlRelation = require('./HtmlRelation'); class HtmlIFrame extends HtmlRelation { get href() { return this.node.getAttribute('src'); } set href(href) { this.node.setAttribute('src', href); } attach(position, adjacentRelation) { this.node = this.from.parseTree.createElement('iframe'); return super.attach(position, adjacentRelation); } } module.exports = HtmlIFrame;