aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content_scripts/ui_component.coffee2
1 files changed, 2 insertions, 0 deletions
diff --git a/content_scripts/ui_component.coffee b/content_scripts/ui_component.coffee
index 72627f69..74b58b82 100644
--- a/content_scripts/ui_component.coffee
+++ b/content_scripts/ui_component.coffee
@@ -12,6 +12,8 @@ class UIComponent
# Default to everything hidden while the stylesheet loads.
styleSheet.innerHTML = "iframe {display: none;}"
+ # Use an XMLHttpRequest, possibly via the background page, to fetch the stylesheet. This allows us to
+ # catch and recover from failures that we could not have caught when using CSS @include (eg. #1817).
UIComponent::styleSheetGetter ?= new AsyncDataFetcher @fetchFileContents "content_scripts/vimium.css"
@styleSheetGetter.use (styles) -> styleSheet.innerHTML = styles