Serenity UI
  • Home
  • Documentation
  • Demos
  • Gallery
  • Support
  • Roadmap
2018.1 Release is here!
  • Subscribe
  • Free Download

Overview

Getting StartedOpen Source Libraries

Modules

serenity.Class
serenity.icalendarserenity.overlayserenity.time

Classes

serenity.DataSourceserenity.Modelserenity.Observableserenity.Routerserenity.ViewModel

Widgets

serenity.autocompleteserenity.chartserenity.colorpalettelistserenity.colorpalettepanelserenity.comboboxserenity.contextmenuserenity.datawidgetserenity.dropdownlistserenity.editorserenity.gridserenity.intervalselectionserenity.kanbanserenity.listviewserenity.notificationserenity.panelserenity.ratingserenity.schedulerserenity.splitterserenity.tableserenity.tagcloudserenity.timepickerserenity.toolbarserenity.treeserenity.widget
serenity.Class
Define a module that simplifies the implementation of prototypical inheritance.
Version Added: 2016.1
Functions
base
Prototypical helper function to create a class that derives from Object.
Version Added: 2016.1

PARAMETERS

def JSON Object
Constructor, properties and methods to define a class.

EXAMPLES

JavaScript

var Person = serenity.Class.base({
  _name: null,
  constructor: function (name) {
    this._name = name;
    this.age = 0;
  },
  age: {
    get: function () {
      return age;
    },
    set: function (value) {
      age = value;
    }
  },
  greetings: function () {
    console.log("My name is: " + this._name + " and I am " + this.age.toString() + " years old");
  }
});
extend
Prototypical inheritance helper function to create a class that derives from another class.
Version Added: 2016.1

PARAMETERS

parent Class
Parent class.
def JSON Object
Constructor, properties and methods to define a class.

EXAMPLES

JavaScript

var Employee = serenity.Class.extend(Person, {
  title: null,
  constructor: function (name, title) {
    Person.call(this, name);
    this.title = title;
  },
  greetings: function () {
    console.log("My name is: " + this._name + " and my title is " + this.title);
  }
});

Subscribe

Why Subscribe?

Get the monthly newsletter with the latest news about Serenity UI including new features, releases and downloads!

Thank you

Thank you for subscribing to Serenity UI!

Demos
Documentation
Terms of Use
Privacy Policy
Contact Us
Copyright © 2016, John DeVight All Rights Reserved.