diff options
Diffstat (limited to 'components/style/parser.rs')
-rw-r--r-- | components/style/parser.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/style/parser.rs b/components/style/parser.rs index f3190f7f72b..f9322a7bcb3 100644 --- a/components/style/parser.rs +++ b/components/style/parser.rs @@ -136,6 +136,12 @@ impl<'a> ParserContext<'a> { .expect("Rule type expected, but none was found.") } + /// Returns whether CSS error reporting is enabled. + #[inline] + pub fn error_reporting_enabled(&self) -> bool { + self.error_reporter.is_some() + } + /// Record a CSS parse error with this context’s error reporting. pub fn log_css_error(&self, location: SourceLocation, error: ContextualParseError) { let error_reporter = match self.error_reporter { |