Module: duktape/modules/util

Duktape-specific utility functions.

Version:
  • $$Id$$
Author:
  • Christopher Brooks, based on Cordova util.js by Marten Lohstroh
Source:

Methods

(static) inherits(ctor, superCtor)

Inherit the prototype methods from one constructor into another.

The Function.prototype.inherits from lang.js rewritten as a standalone function (not on Function.prototype). NOTE: If this file is to be loaded during bootstrapping this function needs to be rewritten using some native functions as prototype setup using normal JavaScript does not work as expected during bootstrapping (see mirror.js in r114903).

Parameters:
Name Type Description
ctor function

Constructor function which needs to inherit the prototype.

superCtor function

Constructor function to inherit prototype from.

Source: