[data-shapes] TypeError: Cannot read properties of null (reading 'classList') (#615)

VladimirAlexiev has just created a new issue for https://github.com/w3c/data-shapes:

== TypeError: Cannot read properties of null (reading 'classList') ==
- @HolgerKnublauch @nicholascar This should be high prio since it hides the examples if one switches Turtle/JSON-LD
- Pinging @smessie as this may be related to latest dark mode changes in respec? But I didn't use dark mode
#497

Steps (Chrome Version 140.0.7339.208 (Official Build) (64-bit) on Windows)
- Open the browser dev tools (control-shift-J)
- go to https://raw.githack.com/w3c/data-shapes/master/shacl12-core/index.html#example-6
- the console shows:
```
The resource https://www.w3.org/Tools/respec/respec-highlight was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.Understand this warning
- click on `JSON-LD`
- Browser says "Paused in debugger" and shows this:
<img width="1519" height="877" alt="Image" src="https://github.com/user-attachments/assets/a0914c0f-9cd4-44b3-b547-385ab512ee58" />

- click back on `Turtle`: no code block is shown
- the console shows:
```
index.html#example-6:1 Unchecked runtime.lastError: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was receivedUnderstand this error
respec.js:6 TypeError: Cannot read properties of null (reading 'classList')
    at button.onclick (index.html:100:53) "Uncaught TypeError: Cannot read properties of null (reading 'classList')" ErrorEvent {isTrusted: true, message: "Uncaught TypeError: Cannot read properties of null (reading 'classList')", filename: 'https://raw.githack.com/w3c/data-shapes/master/shacl12-core/index.html', lineno: 100, colno: 53, …}
(anonymous) @ respec.js:6Understand this error
index.html:100 Uncaught TypeError: Cannot read properties of null (reading 'classList')
    at button.onclick (index.html:100:53)
```



Please view or discuss this issue at https://github.com/w3c/data-shapes/issues/615 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 20 October 2025 07:52:30 UTC