Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
gmta committed Nov 27, 2024
1 parent 3975790 commit f6eb2c6
Show file tree
Hide file tree
Showing 4 changed files with 345 additions and 42 deletions.
1 change: 1 addition & 0 deletions Libraries/LibWeb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ set(SOURCES
DOM/DOMImplementation.cpp
DOM/DOMTokenList.cpp
DOM/Document.cpp
DOM/DocumentExecCommand.cpp
DOM/DocumentFragment.cpp
DOM/DocumentLoadEventDelayer.cpp
DOM/DocumentLoading.cpp
Expand Down
42 changes: 0 additions & 42 deletions Libraries/LibWeb/DOM/Document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5077,48 +5077,6 @@ JS::Value Document::named_item_value(FlyString const& name) const
});
}

// https://w3c.github.io/editing/docs/execCommand/#execcommand()
bool Document::exec_command(String const& command, bool show_ui, String const& value)
{
dbgln("FIXME: document.execCommand(\"{}\", {}, \"{}\")", command, show_ui, value);
return false;
}

// https://w3c.github.io/editing/docs/execCommand/#querycommandenabled()
bool Document::query_command_enabled(String const& command)
{
dbgln("FIXME: document.queryCommandEnabled(\"{}\")", command);
return false;
}

// https://w3c.github.io/editing/docs/execCommand/#querycommandindeterm()
bool Document::query_command_indeterm(String const& command)
{
dbgln("FIXME: document.queryCommandIndeterm(\"{}\")", command);
return false;
}

// https://w3c.github.io/editing/docs/execCommand/#querycommandstate()
bool Document::query_command_state(String const& command)
{
dbgln("FIXME: document.queryCommandState(\"{}\")", command);
return false;
}

// https://w3c.github.io/editing/docs/execCommand/#querycommandsupported()
bool Document::query_command_supported(String const& command)
{
dbgln("FIXME: document.queryCommandSupported(\"{}\")", command);
return false;
}

// https://w3c.github.io/editing/docs/execCommand/#querycommandvalue()
String Document::query_command_value(String const& command)
{
dbgln("FIXME: document.queryCommandValue(\"{}\")", command);
return String {};
}

// https://drafts.csswg.org/resize-observer-1/#calculate-depth-for-node
static size_t calculate_depth_for_node(Node const& node)
{
Expand Down
1 change: 1 addition & 0 deletions Libraries/LibWeb/DOM/Document.idl
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ interface Document : Node {
readonly attribute Element? scrollingElement;

// https://w3c.github.io/editing/docs/execCommand/
// FIXME: [CEReactions] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional (TrustedHTML or DOMString) value = "");
[CEReactions] boolean execCommand(DOMString commandId, optional boolean showUI = false, optional DOMString value = "");
boolean queryCommandEnabled(DOMString commandId);
boolean queryCommandIndeterm(DOMString commandId);
Expand Down
Loading

0 comments on commit f6eb2c6

Please sign in to comment.