Skip to content

Commit

Permalink
Use classList instead of manipulating className.
Browse files Browse the repository at this point in the history
  • Loading branch information
lapo-luchini committed Apr 1, 2024
1 parent bbd561f commit b6c0059
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,14 @@ export class ASN1DOM extends ASN1 {
return node;
}
fakeHover(current) {
this.node.className += ' hover';
this.node.classList.add('hover');
if (current)
this.head.className += ' hover';
this.head.classList.add('hover');
}
fakeOut(current) {
let re = / ?hover/;
this.node.className = this.node.className.replace(re, '');
this.node.classList.remove('hover');
if (current)
this.head.className = this.head.className.replace(re, '');
this.head.classList.remove('hover');
}
toHexDOM_sub(node, className, stream, start, end) {
if (start >= end)
Expand Down

0 comments on commit b6c0059

Please sign in to comment.