← Back to release summary

Stop evaluating script elements moved between Documents during fetching

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 79)
Intent stage
Removed

Summary

Do not evaluate scripts or fire error/load events, if <script> elements are moved between Documents during fetching. Script elements can be still moved between Documents, but they won't be executed.

Motivation

This is to prevent possible security bug, because there have been several bad XSS-related bugs in Chromium due to the code path for executing <script> elements moved between Documents.

Standards & signals

Docs: https://github.com/whatwg/html/issues/2469 https://github.com/whatwg/html/pull/2673 https://github.com/web-platform-tests/wpt/pull/5911 https://www.chromestatus.com/metrics/feature/timeline/popularity/2528

View on chromestatus.com