Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RuntimeWarningCollector is a service, where a new warning will can be
added using the
Warn
method. Warning is an instance ofDotvvmRuntimeWarning, contains a message and may contain a reference to
an exception and a bindable object.
By default, warnings are collected in Debug mode. They are displayed in
browser JS console and forwarded to Asp.Net Core logging.
IDotvvmWarningSink is extensibility point for people that want to
collect these warnings on their own.
As a demo, HtmlWriter reports warnings when elements that should be
always self-closing contain some content, as the browser will interpret
the content as sibling.
related to #745, but does not close it since this PR introduces only the infrastructure.
Also note that I had to move rendering of resources in postback after rendering of
PostBack.Update
controls. Since we support resource registration in theRender
phase, this would need to be done anyway. I have alteredIHtmlWriter
andIViewModelSerializer
, but these interfaces are so bound to the implementations in framework, that I don't believe somebody has implemented them...The public API looks like this: