-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix global resource registration in master pages
When the RequiredResource controls are added at the end of the page, the DefaultDotvvmViewBuilder would crash. This specialcases the RequiredResource, since it doesn't render anything, it's safe to include anywhere
- Loading branch information
Showing
4 changed files
with
147 additions
and
10 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
53 changes: 53 additions & 0 deletions
53
src/Tests/ControlTests/testoutputs/ServerSideStyleTests.AddResourceWithMasterPage.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
<head> | ||
|
||
|
||
|
||
|
||
<!-- Resource knockout of type ScriptResource. Pointing to EmbeddedResourceLocation. --> | ||
<script src=/dotvvmResource/knockout/knockout defer></script> | ||
<!-- Resource dotvvm.internal of type ScriptModuleResource. Pointing to EmbeddedResourceLocation. --> | ||
<script src=/dotvvmResource/dotvvm--internal/dotvvm--internal type=module defer></script> | ||
<!-- Resource dotvvm of type InlineScriptResource. --> | ||
|
||
<!-- Resource dotvvm.debug of type ScriptResource. Pointing to EmbeddedResourceLocation. --> | ||
<script src=/dotvvmResource/dotvvm--debug/dotvvm--debug defer></script> | ||
</head> | ||
<body> | ||
|
||
<div class=master1> | ||
|
||
real body | ||
|
||
</div> | ||
|
||
|
||
<!-- Resource test-resource4 of type InlineScriptResource. --> | ||
<script>alert(4)</script> | ||
<!-- Resource test-resource3 of type InlineScriptResource. --> | ||
<script>alert(3)</script> | ||
<!-- Resource test-resource2 of type InlineScriptResource. --> | ||
<script>alert(2)</script> | ||
<!-- Resource test-resource5 of type InlineScriptResource. --> | ||
<script>alert(5)</script> | ||
<!-- Resource test-resource1 of type InlineScriptResource. --> | ||
<script>alert(1)</script> | ||
<input type=hidden id=__dot_viewmodel_root value='{ | ||
"viewModel": { | ||
"$csrfToken": "Not a CSRF token." | ||
}, | ||
"url": "/testpage", | ||
"virtualDirectory": "", | ||
"renderedResources": [ | ||
"knockout", | ||
"dotvvm.internal", | ||
"dotvvm", | ||
"dotvvm.debug", | ||
"test-resource4", | ||
"test-resource3", | ||
"test-resource2", | ||
"test-resource5", | ||
"test-resource1" | ||
], | ||
"typeMetadata": {} | ||
}' /><script defer src="data:text/javascript;base64,ZG90dnZtLm9wdGlvbnMuY29tcHJlc3NQT1NUPWZhbHNlOwp3aW5kb3cuZG90dnZtLmluaXQoImVuLVVTIik7"></script></body> |