DOMContentLoaded is never fired for ImageDocuments and
document.readyState doesn't behave the way we want.
Turns out you can just append immediately, though, so we do that.
This function accepts a callback as argument that will be called once
the commandline has been removed from the page. After the callback has
been executed, the commandline is re-inserted in the page.
exmode.parser now converts strings to the types given in excmd
signatures.
Messaging now works in both directions (but I haven't made excmds.ts use
the new system yet. Exercise for the reader (see keydown_* state() for a
simple example)).
keys are now being suppressed, but in a pretty stupid way.
I got fed up of not having proper itertools, or str conversions, so I
wrote some. Others have written them in JS, but they were fun to make.
Only the ones I'm using are tested.
* prev tab ('#') isn't always the previously
selected tab, i.e., even if you remotely close
the previously selected tab, since we determine
based on time of last access, we always have a
previous tab as long as there is more than one
tab in the window.
* related, displayed prev tab could be wrong if
user unfocuses commandline, switches tabs via
other means and returns to the already opened
:buffer. Possible solution could be to share the
variable so it is only set when tabs are listed.
* Sometimes favicons initially fail to load but
reappear in the commandline when you switch to
the tab. Appears unrelated to whether the tab
is discarded (unloaded in memory).
* Unsuccessfully adding rules for <a> tags.
Beside incompetence, Firefox might be overriding?
Motivation:
- Most test frameworks expect modules
- I'm told they're the future
Changes:
- Every typescript source file is now an es6 module
- Build system is now webpack (tho rollup makes nicer outputs)
- Outputs of buildsystem are one js file per entry point (background,
content, commandline_frame)
- These bundled js files are generated by traversing the dependency
graph of each entry point