All examples are written in core HTML/JavaScript, and P4JsApi/P4VJS (no frameworks used).

The original P4JSAPI examples live in ./jsapi. All ported examples live in ./p4vjs.

displayinfo
============

./jsapi/displayinfo.html
Displays all connection properties loaded by P4V for every connection.
The program creates the content dynamically; no JavaScript function is used.

./p4vjs/displayinfo.html
The dynamic content generation is moved to an async function so that every P4JScript method can be succeeded by an await. This produces the behavior expected when using synchronous calls to the server.

The encoder functions are no longer implemented in the server. This example uses esapi4js instead.

serverinfo
==========

./jsapi/serverinfo.html
This example runs 'p4 info' and displays the name/value pairs in a table.

./p4vjs/serverinfo1.html
A synchronous implementation, very much like serverinfo.html (using async/wait).

./p4vjs/serverinfo2.html
An asynchronous implementation, using 'promise.then(function(value) {....})', an inline callback implementation.

./p4vjs/serverinfo3.html
An asynchronous implementation using a named callback function.

tenchanges.html
===============

./jsapi/tenchanges.html
Runs a query.

./p4vjs/tenchanges1.html
A synchronous implementation, very much like tenchanges.html (using async/wait).

./p4vjs/tenchanges2.html
An asynchronous implementation, using 'promise.then(function(value) {....})', an inline callback implementation.

imagelist.html
==============

./jsapi/imageList.html
Displays all P4V images that can be used by P4JsApi programmers.

./p4vjs/imageList.html
A synchronous implementation, very much like jsapi/imagelist.html (using async/wait).

selection.html
==============

./jsapi/selection.html
Demonstrates 'retrieve selection' and 'set selection'.

./p4vjs/selection.html
Demonstrates 'retrieve selection' and 'set selection' using P4JScript.
