Namespace: WrapperUtils

WrapperUtils

A collection of utility functions and constants for creating PhET-iO wrappers. Available in the main PhET-iO js import.

Members

(static) CAMEL_CASE_SIMULATION_NAME

(static) PHET_IO_LIB_ABSOLUTE_PATH

(static, constant) SIMULATION_NAME

The hyphenated name of the simulation

(static, constant) SIMULATION_VERSION

The version of the simulation

Methods

(static) appendQueryString(url, queryParameters) → {string}

Appends a query string to a given url.
Parameters:
Name Type Description
url may or may not already have other query parameters
queryParameters may start with '', '?' or '&'
Returns:
Type
string

(static) appendQueryStringArray(url, queryStringArray) → {string}

Helper function for multiple query strings
Parameters:
Name Type Description
url string may or may not already have other query parameters
queryStringArray Array.<string> each item may start with '', '?', or '&'
Returns:
Type
string

(static) getSimPhetioID(suffix) → {string}

Most PhET-iO IDs are prefixed by the simulation name. This method automatically prepends the simulation name to the phetioID.
Parameters:
Name Type Description
suffix string the tail of the phetioID
Returns:
Type
string

(static) getSimURL(config) → {string}

Gets the URL for launching the PhET-iO simulation HTML.
Parameters:
Name Type Description
config Object {boolean} debug, {string} relativePathToRoot
Returns:
Type
string