Skip to content

Core of the user agent that allows navigation of the (X)HTML documents according to HTML5 specification. Core is strictly written in pure Java and includes scripting support with partial BOM and DOM. It has been developed independently for CSSBox project as part of master's thesis.

License

ITman1/ScriptBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SCRIPTBOX LIBRARY

This project implements the extension for scripting inside (X)HTML documents . It introduces simple non-UI user agent which implements general scripting support and Web API for arbitrary scripting language. Basic implementation includes scripting support for JavaScript scripting language which is ensured by Rhino. In addition to that project implements also UI user agent based on SwingBox rendering component .

Status of project: (in development)
Implemented scripting engines: JavaScript
Development suite: Eclipse (Kepler Service Release 1)

Building library

Requirements

  1. Have installed JDK 1.6 or newer - JDK 1.8 is recommended
  2. Have installed Maven build manager
  3. Have set system variable JAVA_HOME to directory with installed JDK and have its binary directory in the system variable PATH - e.g. on Windows add to PATH variable %JAVA_HOME%\bin (more here)
  4. Have in the system variable PATH the directory with Maven installation
  5. Have cloned latest version of CSSBox, CSSParser and SwingBox repository
  6. Have built and installed the CSSBox, CSSParser and SwingBox packages into the local Maven repository (see guide) Note: Other dependency packages will be reached automatically from public repositories

Building

Simply run command: mvn package

Using the library

Requirements

Have built library (see previous section) and have it specified on classpath

Demos

Library package contains some demos located on org.fit.cssbox.scriptbox.demo.

List of demos:

  1. SimpleUserAgent - Simple web browser that have only location bar and history traversal buttons
  2. JavaScriptTesterUserAgent - Application that adds simple debugging components for testing the scripts

Example of using library

import org.fit.cssbox.scriptbox.browser.BrowsingUnit;
import org.fit.cssbox.scriptbox.browser.UserAgent;

UserAgent userAgent = new UserAgent();
BrowsingUnit browsingUnit = userAgent.openBrowsingUnit();
browsingUnit.navigate("http://cssbox.sourceforge.net/");

Known issues

Project is still in phase of development and targets the experimental frame of new HTML 5.1 specification which has not been released yet, so bugs may occur in the current implementation or also in specification itself.

If you run into any bug, please report on:
https://github.com/ITman1/ScriptBox/issues

Issue list:

  1. Thrown error during javac build: error: annotation XYZ is missing value for the attribute <clinit>

Contact and credits

Author: Radim Loskot
gmail.com: radim.loskot (e-mail)

Credits

About

Core of the user agent that allows navigation of the (X)HTML documents according to HTML5 specification. Core is strictly written in pure Java and includes scripting support with partial BOM and DOM. It has been developed independently for CSSBox project as part of master's thesis.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages