Page

Page is a type in FrameworkJS that users can define the new pages by this.

var pageName = new Page('pageName', function () {
    // after page shown
    }, function () {
        // before page shown
    }, function () {
        // after page closed
    }, function () {
        // before page closed
});
  • Type: Object

  • Detail

    the var pageName is an instance of Page that defined for every page. therefore each page has a name in its first parameter that is the same as the name variable, but without the "Page" keyword.

    Parameters Type Description
    name String The name of the page, so every page has the own specifice and unique name
    after page show function The operation that need to be shown after showing page.
    before page shown function Before the page is going to be shown, the operations will be here to run.
    after page closed function The operation that should be executed after closing the page.
    before page closed function The operation that should be executed before closing the page.
  • Example
    Performing a page definition inside FrameworkJS:
    var homePage = new Page('home', function () {
        // after page shown
        }, function () {
            // before page shown
        }, function () {
            // after page closed
        }, function () {
            // before page closed
    });