You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, so I was taking a quick look at rust-lang/rust-bindgen#1367, and realized that chrome rendered differently than Firefox the bindgen book.
Turns out that the theming stuff is not working in Chrome because chrome doesn't wait for stylesheets to load in order to execute script. You can see an example in:
The reason why they don't work is because HTMLLinkElement.disabled, when called via the WebIDL setter, it doesn't do anything if HTMLLinkElement.sheet is null (this bit is compatible across browsers, but for more fun related to disabled and such I invite you to whatwg/html#3840 :)).
In any case, this should probably just use the rel attribute, using alternate stylesheet as the rel value for the disabled sheets. I think that should work everywhere.
The text was updated successfully, but these errors were encountered:
emilio
added a commit
to emilio/mdBook
that referenced
this issue
Sep 8, 2018
Closing per the comment at #785 (comment), I can't reproduce this. Please comment, reopen, or open a new issue if there is a way to reproduce this now.
Hey, so I was taking a quick look at rust-lang/rust-bindgen#1367, and realized that chrome rendered differently than Firefox the bindgen book.
Turns out that the theming stuff is not working in Chrome because chrome doesn't wait for stylesheets to load in order to execute script. You can see an example in:
(with an existing
foo.css
file).onload
doesn't reliably get logged beforescript
. You can see the testcase online in https://crisal.io/tmp/load-sheet.html. For me https://rust-lang-nursery.github.io/mdBook/cli/watch.html renders the code blocks dark on chrome, for example.The reason why they don't work is because
HTMLLinkElement.disabled
, when called via the WebIDL setter, it doesn't do anything ifHTMLLinkElement.sheet
is null (this bit is compatible across browsers, but for more fun related todisabled
and such I invite you to whatwg/html#3840 :)).In any case, this should probably just use the
rel
attribute, usingalternate stylesheet
as therel
value for the disabled sheets. I think that should work everywhere.The text was updated successfully, but these errors were encountered: