-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom Body: Reintroduce support for
turbo:reload
Add test coverage for a mismatch between current and new `<meta name="turbo-body">` elements in the respective `<head>` elements. Prior to this commit, the original version would never return `PageRenderer.shouldRender == false` because `Page.getBodyElement` never returned `null` (since it always fell back to the provided `HTMLElement` instance). After this commit, the `Page.getBodyElement` could return `null`, which is guarded against in `PageRenderer.renderElement`.
- Loading branch information
1 parent
3151587
commit 98cde44
Showing
4 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="turbo-body" content="main"> | ||
<title>Drive (with custom body)</title> | ||
<script src="/dist/turbo.es2017-umd.js" data-turbo-track="reload"></script> | ||
<script src="/src/tests/fixtures/test.js"></script> | ||
</head> | ||
<body> | ||
<main id="main"> | ||
<h1>Drive (with custom body 3)</h1> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters