mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 22:04:59 +00:00
LibWeb: Add the submit event to HTMLFormElement
Also adds the ability to submit from JavaScript.
This commit is contained in:
parent
9950270808
commit
773df8826d
10 changed files with 120 additions and 4 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/HTMLAnchorElement.h>
|
||||
#include <LibWeb/HTML/HTMLElement.h>
|
||||
#include <LibWeb/Layout/TextNode.h>
|
||||
|
||||
|
@ -131,4 +132,10 @@ String HTMLElement::inner_text()
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
bool HTMLElement::cannot_navigate() const
|
||||
{
|
||||
// FIXME: Return true if element's node document is not fully active
|
||||
return !is<HTML::HTMLAnchorElement>(this) && !is_connected();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue