Javascript Framework

Download the ZIP library file CLICKING HERE
Current version is 0.99.99y released on Gen 12 2021
If interested, read our change-log
Inside you will find two version. Both minified but one for development with the debug-mode already active and all console messages inside, while the other one is for production with the debug-mode deactivated and without console messages to reduce its size more.

Open your standard index file and add kirja.min.js or kirja.dev.min.js to its head tag:
Source code
4 lines
<head>
...
<script type="text/javascript" src="kirja.min.js"></script>
</head>
YES, that's all to immediatly start using all its functionalities... no brainy installation or compilation.
No dependencies... nothing!!

The main object of the library is __ (double underscores).

As seen in the main page, Kirja.js have 7 main modules that can be used:
  • __.pages
  • __.history
  • __.globals
  • __.cache
  • __.templates
  • __.preloader
  • __.router

All these modules as well as the templating capabilities can also be used in your index file as if it were a normal "page" file.

You can find a complete explanation of all these modules clicking the API menu link.

Debugging

The library try to help you understand what and where errors/problems are, using some custom console messages that will help you solve them.
This obviously is only to help you in the development of your web application and it doesn't want to replace the normal debugging system.

So, if something seem to work not as expected, open the browser console and check if there is anything that the library wants to tell you.

During development you can activate the Kirja.js debug, in this way:
Source code
1 line
__.allowDebug = true;

REMEMBER to set it before the index page is fully initialized otherwise, for security reasons, the framework will reject the change.

The debugging mode will give you also other advantages that we'll be implemented later or that can be implemented with plugins.

Security

Kirja.js obviously care about security so any report will be considered as something prioritary!
Said that, we've already considered many things to secure the current version. Let's see some:
  • variable templates do not accept HTML tags
  • variable templates used in HTML attributes are escaped
  • all script tags on pages are not executed
  • ...and more!

Anyway it's obvious that we cannot prevent all the possible security risks so, you need to be always aware of what you're doing!



Now discover something more about pages.
HOW PAGES WORKS keyboard_arrow_right
en
cached content