speced / speced/respec

Theme toggle fails to inject in FireFox

Open
#5,200 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
806
Forks
434
Avg merge
1d 21h
Merged PRs (30d)
32

Description

Description of problem

URL to affected spec or repo:

See attached index.html file

What happened (e.g., it crashed)?:

The theme toggle does not display in FireFox.

Expected behavior (e.g., it shouldn't crash):

I expect to see the theme toggle.

Optional, steps to reproduce:

  1. Open index.html in FireFox
Image

Multiple errors are logged:

  • Cross origin request blocked to load respect-highlight.js
  • Error in updateTheme part of fixup.js line 374

Note that no error are logged when the webpage is accessed via: https://w3c.github.io/matf/

I would expect that respect-highlight.js should also be loadable from localhost.

And the updateTheme could potentially also work from localhost?
It does work in Chrome.

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by opening the attached index.html in Firefox, then inspect fixup.js around line 374 and the loading path for respect-highlight.js. Compare the local behavior with https://w3c.github.io/matf/ and verify that the theme toggle appears without the reported console errors when the fix is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.