Sha256: f721a6ece7d9bbfe85995c1b6a32cf6e3a8c9b0eec081785fe04be425216bc61
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
"use strict"; const HTMLElementImpl = require("./HTMLElement-impl").implementation; const LinkStyleImpl = require("./LinkStyle-impl").implementation; const idlUtils = require("../generated/utils"); const domSymbolTree = require("../helpers/internal-constants").domSymbolTree; const NODE_TYPE = require("../node-type"); const evaluateStylesheet = require("../helpers/stylesheets").evaluateStylesheet; const documentBaseURL = require("../helpers/document-base-url").documentBaseURL; class HTMLStyleElementImpl extends HTMLElementImpl { _attach() { if (this.type && this.type !== "text/css") { return; } let content = ""; for (const child of domSymbolTree.childrenIterator(this)) { if (child.nodeType === NODE_TYPE.TEXT_NODE) { content += child.nodeValue; } } evaluateStylesheet(this, content, this.sheet, documentBaseURL(this._ownerDocument)); super._attach(); } } idlUtils.mixin(HTMLStyleElementImpl.prototype, LinkStyleImpl.prototype); module.exports = { implementation: HTMLStyleElementImpl };
Version data entries
3 entries across 3 versions & 3 rubygems