June Framework v 2.0

JUNE.start

Description

This method simply sets up the init method of the script you pass it as an event listener for the load event of the window object, which represents the browser window that contains the current page.

Arguments

Object. The name of the Object to call after the page has loaded. This argument is required.

Usage

Usage:

JUNE.start(theObject);

Note:

This method will fire up only AFTER the DOM content(images, media, external resources, etc.) has been completely loaded.

Example

Execute multiple functions after the document has loaded:

Example:

var ClientScript = {

    init : function() {

        // Code to execute after page loads

        ClientScript.customMethod1();

        ClientScript.customMethod2();

        ClientScript.customMethod3();

    },

    customMethod1 : function () {

        // do something here.

    },

    customMethod2 : function () {

        // do something here.

    },

    customMethod3 : function () {

        // do something here.

    },

};

JUNE.start(ClientScript);

Go to top

© 2008 Costin Trifan. All rights reserved.

The JUNE Framework is released under the MIT license.