Portal has reached its End of Life and is no longer maintained! Use Use Cettia. ×

Installation

Download

Git repository

Download portal.js and copy it to the static folder. The portal server may do that for you.

CDN

Compressed and uncompressed official version of portal.js are available on the cdnjs. Note that there may be delays between a release and its availability.

<script src="//cdnjs.cloudflare.com/ajax/libs/portal/1.0.1/portal.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/portal/1.0.1/portal.min.js"></script>

WebJars

If you want manage the portal.js as a dependency in Java Virtual Machine based application, go to WebJars and search ‘portal’. For the details, see their documentation. Compressed and uncompressed official version of portal.js are available and note that there may be delays between a release and its availability.

Loading

Standalone

Use script tag as a typical way to load script.

<script src="/portal/portal.min.js"></script>
<script>
portal.open("/portal").on({
    // Pseudo event
    connecting: function() {},
    waiting: function(delay, attempts) {},
    // Network event
    open: function() {},
    close: function(reason) {},
    // Message event
    message: function(data) {},
    eventname: function(data) {}
});
</script>