assetgraph
Version:
An auto discovery dependency graph based optimization framework for web pages and applications
19 lines (14 loc) • 402 B
JavaScript
const HtmlRelation = require('./HtmlRelation');
class HtmlVideo 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('video');
return super.attach(position, adjacentRelation);
}
}
module.exports = HtmlVideo;