-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
dotnet/samples
#894Labels
easyIssue should be easy to implement, good for first-time contributorsIssue should be easy to implement, good for first-time contributorshelp wantedGood for community contributors to help [up-for-grabs]Good for community contributors to help [up-for-grabs]
Milestone
Description
There is a formatting issue in the document: HtmlElementInsertionOrientation Enum
if (webBrowser1.Document != null)
{
HtmlDocument doc = webBrowser1.Document;
// Do not insert the warning again if it already exists.
HtmlElementCollection returnedElems = doc.All.GetElementsByName("ADatumWarningDiv");
if ((returnedElems != null) && (returnedElems.Count > 0))
{
return;
}
HtmlElement divElem = doc.CreateElement("DIV");
divElem.Name = "ADatumWarningDiv";
divElem.Style = "background-color:black;color:white;font-weight:bold;width:100%;";
divElem.InnerText = message;
divElem = doc.Body.InsertAdjacentElement(HtmlElementInsertionOrientation.AfterBegin, divElem);
}
Should be like this:
if (webBrowser1.Document != null)
{
HtmlDocument doc = webBrowser1.Document;
// Do not insert the warning again if it already exists.
HtmlElementCollection returnedElems = doc.All.GetElementsByName("ADatumWarningDiv");
if ((returnedElems != null) && (returnedElems.Count > 0))
{
return;
}
HtmlElement divElem = doc.CreateElement("DIV");
divElem.Name = "ADatumWarningDiv";
divElem.Style = "background-color:black;color:white;font-weight:bold;width:100%;";
divElem.InnerText = message;
divElem = doc.Body.InsertAdjacentElement(HtmlElementInsertionOrientation.AfterBegin, divElem);
}
Please check and modify it.
Metadata
Metadata
Assignees
Labels
easyIssue should be easy to implement, good for first-time contributorsIssue should be easy to implement, good for first-time contributorshelp wantedGood for community contributors to help [up-for-grabs]Good for community contributors to help [up-for-grabs]