Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/white-space-nowrap-to-pre-line.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>No crashes or DCHECK failures if white-space changes from nowrap to pre-line</title>
<link rel="author" title="Peng Zhou" href="mailto:zhoupeng.1996@bytedance.com">
<style>
span {
white-space: nowrap;
}
</style>
<script>
window.addEventListener('load', () => {
const span = document.querySelector('span');
span.innerHTML = 'text\n\t';
requestAnimationFrame(() => {
// pre-line should remove end-of-line spaces
span.style.whiteSpace = 'pre-line';
});
});
</script>
</head>
<body>
<span></span>
</body>
</html>