Universeorange.com/Docs/

Priya library Introduction

Priya is a javascript library which introduces some nice javascript functions.

Some of javascript build-in functions are wrapped to easily remember functions.

There are functions to bind certain things to certain elements. Priya binds itself to the element.
Then you can adjust the element to your needs and even make a request which then is handled by R3m or another request handler.

The request is handled as json, any other format will be displayed as debug.

There is also a namespace function: _('namespace') where you can group multiple functions for a certain job, more on that in the examples.

In the global space of javascript, the following methods are available:

When Priya is loaded you can attach priya to an element with the attach() method.
To select an element using select, you are using the querySelectorAll() method internally.
Priya is then attached on the result or resultset.
require() is used to load javascript sources and wait for it to load and then do some stuff with it, or something else.
request() is used to update a page, element or elements on the page. Also form submission can be handled with it.

On the element side for example are these functions available:

A bootstrap.json file is used to bootstrap all the different functions. You can extend it to your needs.

Be aware when updating: don't forget to update bootstrap.json with your own required files.

Last modified: 2021-06-07

© 2021 universeorange.com