mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-23 10:50:49 +00:00
LibWeb: Disallow Editing API calls on non-HTML documents
This is not directly mentioned in the Editing API spec, but all major browsers do this and there is a WPT for this behavior.
This commit is contained in:
parent
2cee6aeba3
commit
a0b0e91d4f
Notes:
github-actions[bot]
2025-01-21 18:09:45 +00:00
Author: https://github.com/tcl3
Commit: a0b0e91d4f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3332
Reviewed-by: https://github.com/gmta ✅
8 changed files with 89 additions and 31 deletions
|
@ -581,12 +581,12 @@ public:
|
|||
void set_previous_document_unload_timing(DocumentUnloadTimingInfo const& previous_document_unload_timing) { m_previous_document_unload_timing = previous_document_unload_timing; }
|
||||
|
||||
// https://w3c.github.io/editing/docs/execCommand/
|
||||
bool exec_command(FlyString const& command, bool show_ui, String const& value);
|
||||
bool query_command_enabled(FlyString const& command);
|
||||
bool query_command_indeterm(FlyString const& command);
|
||||
bool query_command_state(FlyString const& command);
|
||||
bool query_command_supported(FlyString const& command);
|
||||
String query_command_value(FlyString const& command);
|
||||
WebIDL::ExceptionOr<bool> exec_command(FlyString const& command, bool show_ui, String const& value);
|
||||
WebIDL::ExceptionOr<bool> query_command_enabled(FlyString const& command);
|
||||
WebIDL::ExceptionOr<bool> query_command_indeterm(FlyString const& command);
|
||||
WebIDL::ExceptionOr<bool> query_command_state(FlyString const& command);
|
||||
WebIDL::ExceptionOr<bool> query_command_supported(FlyString const& command);
|
||||
WebIDL::ExceptionOr<String> query_command_value(FlyString const& command);
|
||||
|
||||
// https://w3c.github.io/selection-api/#dfn-has-scheduled-selectionchange-event
|
||||
bool has_scheduled_selectionchange_event() const { return m_has_scheduled_selectionchange_event; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue