Skip to content

Commit

Permalink
blocking="render" (#1466)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiedziolkaMichal authored Nov 2, 2022
1 parent 507f551 commit df5d4e2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions schema/html5/common.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ common.attrs.other =
w:string "autofocus" | w:string ""
}

common.attrs.blocking =
attribute blocking {
list { w:string "render" }
}

common.attrs.nonce =
attribute nonce {
string
Expand Down
1 change: 1 addition & 0 deletions schema/html5/core-scripting.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ datatypes w = "http://whattf.org/datatype-draft"
& script.attrs.language? # restricted in Schematron
& script.attrs.integrity?
& embedded.content.attrs.crossorigin?
& common.attrs.blocking?
& referrerpolicy?
)
script.attrs.src =
Expand Down
2 changes: 2 additions & 0 deletions schema/html5/meta.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ datatypes w = "http://whattf.org/datatype-draft"
& link.attrs.imagesizes?
# link.attrs.title included in common.attrs
& embedded.content.attrs.crossorigin?
& common.attrs.blocking?
& common.attrs.aria.role.link?
)
link.attrs.href =
Expand Down Expand Up @@ -253,6 +254,7 @@ datatypes w = "http://whattf.org/datatype-draft"
( common.attrs
& style.attrs.type?
& style.attrs.media?
& common.attrs.blocking?
# style.attrs.title included in common.attrs
)
style.attrs.type =
Expand Down
12 changes: 12 additions & 0 deletions src/nu/validator/checker/schematronequiv/Assertions.java
Original file line number Diff line number Diff line change
Expand Up @@ -3166,6 +3166,18 @@ else if ("bdo" == localName && atts.getIndex("", "dir") < 0) {
+ " \u201Cprerender\u201D, or"
+ " \u201Cstylesheet\u201D.");
}
if (atts.getIndex("", "blocking") > -1
&& (atts.getIndex("", "rel") == -1
|| !(relList.contains("modulepreload")
|| relList.contains("preload")
|| relList.contains("stylesheet")))) {
err("A \u201Clink\u201D element with a"
+ " \u201Cblocking\u201D attribute must have a"
+ " \u201Crel\u201D attribute whose value is"
+ " \u201Cmodulepreload\u201D,"
+ " \u201Cpreload\u201D, or"
+ " \u201Cstylesheet\u201D.");
}
}

// microdata
Expand Down

0 comments on commit df5d4e2

Please sign in to comment.