About ES6 modules and the bundle
Whakerexa is implemented as native ES6 modules. In a normal application,
each feature (menus, dialogs, progress bars, accessibility helpers) is imported dynamically
with import statements and loaded by the browser from separate files.
This modular architecture is ideal for maintainable web applications, but it requires a
module-capable HTTP server and cannot be used directly with file:// URLs.
To simplify quick tests, offline usage, and teaching examples, Whakerexa also provides
a bundle: a single JavaScript file named wexa.bundle.js.
The bundle packs the main Whakerexa modules into one file and exposes them on a global
namespace. You can then write standard scripts without any ES6 import,
while still using the same components (for example MenuManager,
AccessibilityManager, DialogManager, and ProgressBar).
Progress bar demo (bundle usage)
This example creates a ProgressBar instance in “managed mode”. The progress
is updated on the client side every second without any server communication.
Ready to start…
Click the button to launch the demo.
Dialog demo
The dialog below is opened and closed using DialogManager provided by the bundle.