mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -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. */
|
/** Simple container for the state of a single frame's hints. */
|
||||||
class HintState {
|
class HintState {
|
||||||
public focusedHint: Hint
|
public focusedHint: Hint
|
||||||
readonly hintHost = html`<div class="TridactylHintHost cleanslate">`
|
readonly hintHost = document.createElement('div')
|
||||||
readonly hints: Hint[] = []
|
readonly hints: Hint[] = []
|
||||||
public filter = ''
|
public filter = ''
|
||||||
public hintchars = ''
|
public hintchars = ''
|
||||||
|
|
||||||
constructor(public filterFunc: HintFilter) {}
|
constructor(
|
||||||
|
public filterFunc: HintFilter,
|
||||||
|
){
|
||||||
|
this.hintHost.classList.add("TridactylHintHost", "cleanslate")
|
||||||
|
}
|
||||||
|
|
||||||
destructor() {
|
destructor() {
|
||||||
// Undo any alterations of the hinted elements
|
// Undo any alterations of the hinted elements
|
||||||
|
|
Loading…
Add table
Reference in a new issue