Bug 1389421 - Support nonce IDL property; r=ckerschb,smaug

We already support the actual functionality, but nobody added support
for the IDL property to the .webidl file.

Also added <style nonce> to the web-platform-tests reflection tests,
since nobody updated that to the current spec either.

This does not add support for .nonce to SVGScriptElement, because I
couldn't find any standard that specified it.  I updated the wpt tests
to expect .nonce to work on HTMLScriptElement but not SVGScriptElement.

MozReview-Commit-ID: F1K7WMfMoDi
This commit is contained in:
Aryeh Gregor
2017-08-21 14:49:44 +03:00
parent 1e8b09e7d8
commit edd6e8070d
17 changed files with 38 additions and 250 deletions

View File

@@ -81,6 +81,14 @@ public:
{
SetOrRemoveNullableStringAttr(nsGkAtoms::crossorigin, aCrossOrigin, aError);
}
void GetNonce(nsAString& aNonce) const
{
GetHTMLAttr(nsGkAtoms::nonce, aNonce);
}
void SetNonce(const nsAString& aNonce, ErrorResult& aRv)
{
SetHTMLAttr(nsGkAtoms::nonce, aNonce, aRv);
}
void GetIntegrity(nsAString& aIntegrity)
{
GetHTMLAttr(nsGkAtoms::integrity, aIntegrity);