if the spec require FetchEvent return the integrity value

# Zhang, Xiaofeng (2 days ago)


I am not sure this is a proper place to ask the question, but no reply in github: w3c/webappsec-subresource-integrity#71

I am working a chromium fetch test issue, the test is to set a script.integrity, and then determine whether this integrity value and FetchEvent returned integrity value are equal. My question is that if the spec require FetchEvent return this value? I didn't find that here www.w3.org/TR/SRI. Thanks a lot for your kindly answer!

Some test code:

function script_integrity_test(frame, url, integrity, expected_integrity) { var actual_url = url + (++url_count); expected_results[actual_url] = { url: actual_url, mode: 'no-cors', credentials: 'include', redirect: 'follow', integrity: expected_integrity, message: 'Script load (url:' + actual_url + ')' }; return frame.contentWindow.load_script_with_integrity(actual_url, integrity);


function load_script_with_integrity(url, integrity) { var script = document.createElement('script'); script.src = url; script.integrity = integrity; document.body.appendChild(script);


assert_equals(result.integrity, expected.integrity)


Contact us to advertise here
# Frederik Braun (a day ago)

Yes. This is in the fetch spec at [https://fetch.spec.whatwg.org/#concept-request-integrity-metadata](https://fetch.spec.whatwg.org/#concept-request-integrity-metadata) (and

look for other occurences of 'integrity metadata').

Want more features?

Request early access to our private beta of readable email premium.