JBoss Community Archive (Read Only)

Graphene 1

JavaScript

In testing of complex examples, it is often needed to perform custom JavaScript code.
For this purposes, there is implemented JavaScript class, which encapsulates the common functionality:

Constructing

Using new JavaScript(String) constructor or JavaScript.js(String) factory method with same semantics.

Loading

  • from classpath resource - using factory method JavaScript.fromResource(String resourceName)

  • from file - using factory method JavaScript.fromFile(File) 

Joining Scripts

Using JavaScript#join(JavaScript) method.

Appending

Using JavaScript#append(String).

Parametrizing

The JavaScript code placeholders (using SimplifiedFormat format) with JavaScript#parametrize(Object...)

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 12:13:26 UTC, last content change 2011-09-01 11:19:43 UTC.