Sha256: 44fb86ab82aef2bd0e77b39d80cce6ce729201e20d025986ba892d7d6144fdcb

Contents?: true

Size: 780 Bytes

Versions: 14

Compression:

Stored size: 780 Bytes

Contents

var webfont = {};

/**
 * @param {Object} context
 * @param {function(...)} func
 * @param {...*} opt_args
 */
webfont.bind = function(context, func, opt_args) {
  var args = arguments.length > 2 ?
      Array.prototype.slice.call(arguments, 2) : [];

  return function() {
    args.push.apply(args, arguments);
    return func.apply(context, args);
  };
};

webfont.extendsClass = function(baseClass, subClass) {

  // Avoid polluting the baseClass prototype object with methods from the
  // subClass
  /** @constructor */
  function baseExtendClass() {};
  baseExtendClass.prototype = baseClass.prototype;
  subClass.prototype = new baseExtendClass();

  subClass.prototype.constructor = subClass;
  subClass.superCtor_ = baseClass;
  subClass.super_ = baseClass.prototype;
};

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
webfontloader-1.3.0 src/core/namespace.js
webfontloader-1.2.1 src/core/namespace.js
webfontloader-1.2.0 src/core/namespace.js
webfontloader-1.1.2 src/core/namespace.js
webfontloader-1.1.1 src/core/namespace.js
webfontloader-1.1.0 src/core/namespace.js
webfontloader-1.0.31 src/core/namespace.js
webfontloader-1.0.30 src/core/namespace.js
webfontloader-1.0.29 src/core/namespace.js
webfontloader-1.0.28 src/core/namespace.js
webfontloader-1.0.27 src/core/namespace.js
webfontloader-1.0.26 src/core/namespace.js
webfontloader-1.0.25 src/core/namespace.js
webfontloader-1.0.24 src/core/namespace.js