This patchset adds a Button to the toolbar (right next to the location field)
with a star icon. The star is white if the currently visited url is not yet
bookmarked and yellow if a bookmark for the url exists.
After adding or removing a bookmark, the bookmark json file is synced to disk.
Therefore, some new pledge/unveil's have been added.
This patchset adds a bookmark bar that is backed by a json file backend.
The json file is loaded and checked for the format. According to the
format, the bookmarks bar is populated with the bookmark items.
If the bookmarks do not fit into one line, an expader button is shown
that brings up a menu containing the missing bookmark items.
There is currently no way to add or remove bookmarks. A hover over a
bookmark is also not yet showing the url in the statusbar.
We were interpreting "undefined" as a variable lookup failure in some
cases and throwing a ReferenceError exception instead of treating it
as the valid value "undefined".
This patch wraps the result of variable lookup in Optional<>, which
allows us to only throw ReferenceError when lookup actually fails.
We currently use icon paths for this because I didn't want to deal with
implementing icon bitmap sharing right now. In the future it would be
better to post a bitmap somehow instead of a path.
If you receive a channel or query message while the app is inactive,
or while the channel/query is inactive, we now post a desktop
notification so you can learn that something is happening. :^)
Since NotificationServer is a spawn-on-demand + die-when-not-used type
of service, we can't expect a singleton connection to it to remain open
and useful.
We solve this for now by making a new IPC connection for every new
notification sent. Maybe there's a better solution for this.
If you invoke `js` without a script path, it will now enter REPL mode,
where you input commands one by one and immediately get each one
interpreted in one shared interpreter. We support multi-line commands
in case we detect you have unclosed braces or parens or brackets.
Getting the innerHTML property will recurse through the subtree inside
the element and serialize it into a string as it goes.
Setting it will parse the set value as an HTML fragment. It will then
remove all current children of the element and replace them with all
the children inside the parsed fragment.
Setting element.innerHTML will currently force a complete rebuild of
the document's layout tree.
This is pretty neat! :^)
This function allows you to throw away the entire layout tree if that's
something you want to do.
It's certainly not super cheap to reconstruct, but hey, who am I to
tell you what to do? :^)
I've added a post_install step to the system that allows you to run
arbitrary commands after the regular install step.
This allows scripts that start with "#!/bin/bash" to work in Serenity.
The test runner currently depends on the bash port being installed.
If you have it, you can run the LibJS test suite inside Serenity
by simply entering /home/anon/js-tests and doing ./run-tests :^)