JavaScript library 2.0

Supporting Browser-based Javascript and Node.js
User avatar
Lead Developer
Posts: 3165
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada

JavaScript library 2.0

Postby Patrick » Wed Mar 21, 2018 10:04 am

The JavaScript library for phidget22 has been updated to version 2.0. The older version 1.0 has been deprecated.

The reason for the major version bump is because the old library had some inconsistencies with regards to the rest of the Phidget APIs, and so we decided to make breaking changes.

The new library is mostly compatible with the old - the following changes were made:

    -The library filename was changed from jphidgets22.1.0.0.js to phidget22.js
    -The global object in the browser version is not called phidget22
    -The Manager now returns Phidget objects in the attach and detach events - it used to return undocumented internal objects.
    -Managers now apply to all connections rather then being tied to a specific connection.
    -Enumerations have been renamed to be less C-like
    -The Connection class has been documented
    -The Connection constructor now accepts simple hostname, port arguments, in addition to the previous URI argument
    -The Connection class has a new event, called onAuthenticationNeeded, which allows a password to be specified at connect-time rather then class creation time if the server is password protected.
    -Many bugfixes, including unhandled promises, promises that would never reject on failure, etc.
View the updated Language page here:
View the updated API here: or on your Product page.
The Connection class documentation is visible once JavaScript is selected as the language.

Feedback is appreciated.


Return to “Javascript”

Who is online

Users browsing this forum: No registered users and 1 guest