1. portix
  2. hljsc


hljsc - a simple headless commandline javascript environment

hljsc is a simple javascript execution environment, it uses webkit to load a
site and executes scripts in the context of the of the site. Results of the
script are printed to stdout. 

A rather useless example:

echo "(function () { return (new XMLSerializer()).serializeToString(document); })();" | hljsc "http://www.example.com"

This would print http://www.example.com to stdout.