UNPKG

assetgraph

Version:

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

16 lines (12 loc) 401 B
const HtmlRelation = require('./HtmlRelation'); class HtmlInlineFragment extends HtmlRelation { inlineHtmlRelation() { this.node.innerHTML = this.to.text; this.from.markDirty(); } attach(position, adjacentRelation) { this.node = this.from.parseTree.createElement(this.node.nodeName); return super.attach(position, adjacentRelation); } } module.exports = HtmlInlineFragment;