Age | Commit message (Collapse) | Author |
|
Only return whatever a "return" statment told us to return.
The last computed value is now available in Interpreter::last_value()
instead, where the REPL can pick it up.
|
|
|
|
|
|
This is very hackish and should definitely be improved. :^)
|
|
|
|
|
|
We only support Array() with 0 or 1 parameters so far.
|
|
This makes debugging a lot easier since we actually learn that an Error
got thrown.
|
|
This patch makes it possible to execute JavaScript by clicking on an
anchor element with href="javascript:your_script_here()".
|
|
This patch adds support in the parser and interpreter for this:
var a = 1, b = 2, c = a + b;
VariableDeclaration is now a sequence of VariableDeclarators. :^)
|
|
This is just here to make the AST class hierarchy more spec-like.
|
|
|
|
This name matches other parsers.
|
|
|
|
|
|
When we encounter a '<' during HTML parsing, we now look ahead to see
if there is a full </script> coming, otherwise we treat it as text.
This makes it possible to use '<' in inline scripts. :^)
|
|
StartDownload requests for unhandled protocols (or invalid URLs) will
now refuse to load instead of asserting. A failure code is sent back
to LibProtocol and Protocol::Client::start_download() returns nullptr.
Fixes #1604.
|
|
Fixes #1624.
|
|
We can't just blindly dereference the result of getpwnam()/getgrnam()!
Fixes #1625.
|
|
Fixes #1621.
|
|
|
|
|
|
|
|
Make ResourceLoader::load_sync() match load() in checking if the
error_callback is null before actually calling it.
Fixes #1623.
|
|
This allows us to construct menus in a more natural way:
auto& file_menu = menubar->add_menu("File");
file_menu.add_action(...);
Instead of the old way:
auto file_menu = GUI::Menu::construct();
file_menu->add_action(...);
menubar->add_menu(file_menu);
|
|
|
|
Prior to this, UDPServer was using listen/accept, which does not make
sense in the context of UDP.
|
|
This patch relaxes how we think about UDP packets being "for us" a bit;
the proper way to handle this would be to also check if the matched
socket has SO_BROADCAST set, but we don't have that :)
|
|
|
|
Since the newly constructed sub-widget is owned by the TabWidget,
we can simply return a T& here. :^)
|
|
Thanks to @NotKyon for reporting this bug with a solid analysis.
Fixes #1488.
|
|
|
|
Since these are not used by the outside world, no need to expose them.
|
|
|
|
|
|
Fixes #1599
|
|
|
|
Calling save("file") in a repl saves all the typed lines so far
into the specified file. It currently does not have great support for
multilined functions since those get turned into one line.
|
|
Scripts loaded in this way will block the parser until they finish
executing. This means that they see the DOM before the whole document
has been fully parsed. This is all normal, of course.
To make this work, I changed the way we notify DOM nodes about tree
insertion. The inserted_into() callbacks are now incrementally invoked
during parse, as each node is appended to its parent.
To accomodate inline scripts and inline style sheets, we now also have
a children_changed() callback which is invoked on any parent when it
has children added/removed.
|
|
This function creates a nested event loop and runs a load() operation
inside it, returning only once the load has either succeeded or failed.
This will be used to implement blocking loads (ew!)
|
|
The event that triggered the exit from an inner event loop would always
get re-delivered in the outer event loop due to a silly off-by-one
mistake when transferring pending events between loops.
|
|
The Help application was hooking HtmlView::on_link_click, which would
get invoked before DOM event dispatch. Since we were holding on to the
clicked node with a Node*, the DOM node was gone after returning from
the on_link_click callback.
Fix this by keeping DOM nodes in RefPtrs in the event management code.
Also move DOM event dispatch before widget hook invocation, to try and
keep things sane on the LibWeb side of things.
Fixes #1605.
|
|
This reverts commit 6b59311d4bdc1447e085573f9bd2c42819e264dd.
Reverting these changes since they broke things.
Fixes #1608.
|
|
This reverts commit a60ea79a41845767ce40f225de20da7c99534ad1.
Reverting these changes since they broke things.
Fixes #1608.
|
|
This reverts commit 592f218151493fefa2351252c8d4b51750687fea.
Reverting these changes since they broke things.
Fixes #1608.
|
|
|
|
|
|
|
|
When evaluating logical binop expressions, the rhs must not be
evaluated if the lhs leads to the whole expression not being
truthy.
|
|
A lot of web content looks for this property. We'll probably have to
tweak this as we go, but at least now we have it. :^)
|