Skip to content

Commit

Permalink
HtmlWriter: remove upper attribute warning, as it is redundant
Browse files Browse the repository at this point in the history
The same warning is emitted compile-time, which makes this one
redundant. Moreover, the compile-time warning includes smarter
checks, and allows certain cases of uppercase attributes
(in prefixed capabilities)
  • Loading branch information
exyi committed Sep 7, 2024
1 parent c0a911e commit a600e96
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Framework/Framework/Controls/HtmlWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,6 @@ private void WriteAttrWithTransformers(string name, string attributeName, string
{
WriteHtmlAttribute(attributeName, attributeValue);
}

if (this.enableWarnings && char.IsUpper(attributeName[0]))
{
Warn($"{attributeName} is used as an HTML attribute on element {name}, but it starts with an uppercase letter. Did you intent to use a DotVVM property instead? To silence this warning, just use all lowercase letters for standard HTML attributes.");
}
}

private string ConvertHtmlAttributeValue(object value)
Expand Down

0 comments on commit a600e96

Please sign in to comment.