mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Revert "src: Simplify HintState constructor"
This reverts commit 092e501db4
.
This was causing a bug identified by @glacambre and @Lexi where
sometimes the html function isn't defined when returning to a page with
history back.
Personally, I think it's probably webpack or Firefox's fault: content.ts
clearly imports html-tagged-template as it's first action.
If it's not their fault then it's html-tagged-template's fault: it must
be refusing to set window.html.
This commit is contained in:
parent
8d6a79ca50
commit
7ea938f74f
1 changed files with 6 additions and 2 deletions
|
@ -25,12 +25,16 @@ const logger = new Logger('hinting')
|
|||
/** Simple container for the state of a single frame's hints. */
|
||||
class HintState {
|
||||
public focusedHint: Hint
|
||||
readonly hintHost = html`<div class="TridactylHintHost cleanslate">`
|
||||
readonly hintHost = document.createElement('div')
|
||||
readonly hints: Hint[] = []
|
||||
public filter = ''
|
||||
public hintchars = ''
|
||||
|
||||
constructor(public filterFunc: HintFilter) {}
|
||||
constructor(
|
||||
public filterFunc: HintFilter,
|
||||
){
|
||||
this.hintHost.classList.add("TridactylHintHost", "cleanslate")
|
||||
}
|
||||
|
||||
destructor() {
|
||||
// Undo any alterations of the hinted elements
|
||||
|
|
Loading…
Add table
Reference in a new issue