Sha256: 7f588eb3e64040610d02bf72d6611f65ad2b9cb921956510ce9a3e0a7692ed1f
Contents?: true
Size: 700 Bytes
Versions: 3
Compression:
Stored size: 700 Bytes
Contents
"use strict"; const HTMLElementImpl = require("./HTMLElement-impl").implementation; const whatwgURL = require("whatwg-url"); const fallbackBaseURL = require("../helpers/document-base-url").fallbackBaseURL; class HTMLBaseElement extends HTMLElementImpl { get href() { const document = this._ownerDocument; const url = this.hasAttribute("href") ? this.getAttribute("href") : ""; const parsed = whatwgURL.parseURL(url, { baseURL: fallbackBaseURL(document) }); if (parsed === "failure") { return url; } return whatwgURL.serializeURL(parsed); } set href(value) { this.setAttribute("href", value); } } module.exports = { implementation: HTMLBaseElement };
Version data entries
3 entries across 3 versions & 3 rubygems