svgdom
Version:
Straightforward DOM implementation for SVG, HTML and XML
31 lines (28 loc) • 552 B
JavaScript
import { HTMLElement } from './HTMLElement.js'
export class HTMLLinkElement extends HTMLElement {}
Object.defineProperties(HTMLLinkElement.prototype, {
href: {
get () {
return this.getAttribute('href')
},
set (val) {
this.setAttribute('href', val)
}
},
rel: {
get () {
return this.getAttribute('rel')
},
set (val) {
this.setAttribute('rel', val)
}
},
type: {
get () {
return this.getAttribute('type')
},
set (val) {
this.setAttribute('type', val)
}
}
})