Sha256: 7b4d66c1bf69da2d4cedf0173955ee9a636933ca75ce90609db1853168968f9f
Contents?: true
Size: 516 Bytes
Versions: 25
Compression:
Stored size: 516 Bytes
Contents
# frozen_string_literal: true module ThemeCheck # Reports errors when trying to use parser-blocking script tags class ParserBlockingJavaScript < HtmlCheck severity :error categories :html, :performance doc docs_url(__FILE__) def on_script(node) return unless node.attributes["src"] return if node.attributes["defer"] || node.attributes["async"] || node.attributes["type"] == "module" add_offense("Missing async or defer attribute on script tag", node: node) end end end
Version data entries
25 entries across 25 versions & 1 rubygems