From c26d2f4da84f5602477c3e439cde63dbd599393a Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Fri, 21 Jun 2019 10:19:13 +0900 Subject: [PATCH] Allow integrity on link[rel=preload|modulepreload] * https://github.com/whatwg/html/pull/4699/ * https://github.com/whatwg/html/commit/0ec1925 * https://c.whatwg.org/multipage/#attr-link-integrity --- src/nu/validator/checker/schematronequiv/Assertions.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nu/validator/checker/schematronequiv/Assertions.java b/src/nu/validator/checker/schematronequiv/Assertions.java index 544af64af..02d523a3f 100644 --- a/src/nu/validator/checker/schematronequiv/Assertions.java +++ b/src/nu/validator/checker/schematronequiv/Assertions.java @@ -2800,11 +2800,15 @@ else if ("bdo" == localName && atts.getIndex("", "dir") < 0) { } if (atts.getIndex("", "integrity") > -1 && ((relList != null && !relList.contains("stylesheet") + && !relList.contains("preload") + && !relList.contains("modulepreload") || !hasRel))) { err("A \u201Clink\u201D element with an" + " \u201Cintegrity\u201D attribute must have a" + " \u201Crel\u201D attribute that contains the" - + " value \u201Cstylesheet\u201D."); + + " value \u201Cstylesheet\u201D or the value" + + " \u201Cpreload\u201D or the value" + + " \u201Cmodulepreload\u201D."); } if (atts.getIndex("", "sizes") > -1 && ((relList != null && !relList.contains("icon")