From c0f04b7b82ef971c1a50da3c65f155ad2c75031b Mon Sep 17 00:00:00 2001 From: brian cully Date: Wed, 24 Dec 2025 13:08:05 -0500 Subject: step 5: cleanup - src highlight - multiple robo colors - display inspectors side-by-side --- site/inspector.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'site/inspector.mjs') diff --git a/site/inspector.mjs b/site/inspector.mjs index f4f8669..b500478 100644 --- a/site/inspector.mjs +++ b/site/inspector.mjs @@ -7,6 +7,9 @@ const VARS_SELECTOR = '.vars'; const SRC_SELECTOR = '.src'; const IP_SELECTOR = '.wordlist .ip'; +const HIGHLIGHT = new Highlight(); +CSS.highlights.set('exec', HIGHLIGHT); + function selectorForIP(word, offset) { return `.wordlist x-bytecode[x-index='${word}'] x-op[x-index='${offset}']`; } @@ -34,7 +37,6 @@ export default class extends HTMLElement { } #highRange = new Range(); - #highlight = new Highlight(this.#highRange); #srcSelect; #compileButton; #wordlist; @@ -45,7 +47,7 @@ export default class extends HTMLElement { constructor() { super(); - CSS.highlights.set('exec', this.#highlight); + HIGHLIGHT.add(this.#highRange); } connectedCallback() { -- cgit v1.3