mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibWeb: Expose HTMLElement's content editable state
This commit is contained in:
committed by
Andreas Kling
parent
c9a6bac57f
commit
6a85677f70
@@ -819,7 +819,9 @@ bool is_editing_host(GC::Ref<DOM::Node> node)
|
||||
if (!is<HTML::HTMLElement>(*node))
|
||||
return false;
|
||||
auto const& html_element = static_cast<HTML::HTMLElement&>(*node);
|
||||
return html_element.content_editable().is_one_of("true"sv, "plaintext-only"sv) || node->document().design_mode_enabled_state();
|
||||
return html_element.content_editable_state() == HTML::ContentEditableState::True
|
||||
|| html_element.content_editable_state() == HTML::ContentEditableState::PlaintextOnly
|
||||
|| node->document().design_mode_enabled_state();
|
||||
}
|
||||
|
||||
// https://w3c.github.io/editing/docs/execCommand/#element-with-inline-contents
|
||||
|
||||
Reference in New Issue
Block a user