Skip to content

Commit 01290b7

Browse files
authored
Merge pull request #217 from vhiairrassary/vhiairrassary/sri-attributes
Add attributes needed for SRI
2 parents fbb8082 + 845934d commit 01290b7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

scalatags/src/scalatags/generic/Attrs.scala

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,19 @@ trait Attrs[Builder, Output <: FragT, FragT] extends InputAttrs[Builder, Output,
10021002
*/
10031003
lazy val defer = attr("defer").empty
10041004

1005+
/**
1006+
* This attribute specifies an expected hash for a resource.
1007+
*
1008+
* MDN
1009+
*/
1010+
lazy val integrity = attr("integrity")
1011+
/**
1012+
* Indicates if the fetching of the resource must be done using a CORS request.
1013+
*
1014+
* MDN
1015+
*/
1016+
lazy val crossorigin = attr("crossorigin")
1017+
10051018
/**
10061019
* This attribute allows the elimination of parser-blocking JavaScript
10071020
* where the browser would have to load and evaluate scripts before continuing to parse. defer has a similar effect in this case.
@@ -1013,7 +1026,6 @@ trait Attrs[Builder, Output <: FragT, FragT] extends InputAttrs[Builder, Output,
10131026
*/
10141027
lazy val async = attr("async").empty
10151028

1016-
10171029
/**
10181030
* ARIA is a set of special accessibility attributes which can be added
10191031
* to any markup, but is especially suited to HTML. The role attribute

0 commit comments

Comments
 (0)