mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Replace is<T>() with as_if<T>() where possible
This commit is contained in:
parent
3d97251da3
commit
cb1a1a5cb5
Notes:
github-actions[bot]
2025-08-25 16:46:19 +00:00
Author: https://github.com/tcl3
Commit: cb1a1a5cb5
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5985
Reviewed-by: https://github.com/gmta ✅
26 changed files with 92 additions and 109 deletions
|
|
@ -904,9 +904,7 @@ HTML::HTMLHtmlElement* Document::html_element()
|
|||
{
|
||||
// The html element of a document is its document element, if it's an html element, and null otherwise.
|
||||
auto* html = document_element();
|
||||
if (is<HTML::HTMLHtmlElement>(html))
|
||||
return as<HTML::HTMLHtmlElement>(html);
|
||||
return nullptr;
|
||||
return as_if<HTML::HTMLHtmlElement>(html);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dom.html#the-head-element-2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue