语义标签继承
This commit is contained in:
parent
f47f49642e
commit
593fb2d9ad
14
main.js
14
main.js
|
@ -12,7 +12,7 @@ export class div {
|
|||
static get onclick() {
|
||||
console.log('onclick event')
|
||||
return {
|
||||
stop: function(event) {
|
||||
stop: function (event) {
|
||||
console.log(`Stop event: ${event}`)
|
||||
return div
|
||||
}
|
||||
|
@ -22,10 +22,10 @@ export class div {
|
|||
static get onkeydown() {
|
||||
console.log('onkeydown event')
|
||||
return {
|
||||
esc: function() {
|
||||
esc: function () {
|
||||
console.log('esc event')
|
||||
return {
|
||||
keydown: function() {
|
||||
keydown: function () {
|
||||
console.log('keydown event')
|
||||
return div
|
||||
}
|
||||
|
@ -39,3 +39,11 @@ export class div {
|
|||
return this
|
||||
}
|
||||
}
|
||||
|
||||
export class button extends div { }
|
||||
export class span extends div { }
|
||||
|
||||
export class header extends div { }
|
||||
export class footer extends div { }
|
||||
export class main extends div { }
|
||||
|
||||
|
|
Loading…
Reference in New Issue