diff options
Diffstat (limited to 'extensions/renderer/resources/utils.js')
-rw-r--r-- | extensions/renderer/resources/utils.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/extensions/renderer/resources/utils.js b/extensions/renderer/resources/utils.js index dd1ec2a..853c652 100644 --- a/extensions/renderer/resources/utils.js +++ b/extensions/renderer/resources/utils.js @@ -72,15 +72,18 @@ function loadTypeSchema(typeName, defaultSchema) { * instance of the implementation class). * @param {string} name The name of the exposed wrapper class. * @param {Object} cls The class implementation. - * @param {{functions: ?Array.<string>, + * @param {{superclass: ?Function, + * functions: ?Array.<string>, * properties: ?Array.<string>, * readonly: ?Array.<string>}} exposed The names of properties on the - * implementation class to be exposed. |functions| represents the names of - * functions which should be delegated to the implementation; |properties| - * are gettable/settable properties and |readonly| are read-only properties. + * implementation class to be exposed. |superclass| represents the + * constructor of the class to be used as the superclass of the exposed + * class; |functions| represents the names of functions which should be + * delegated to the implementation; |properties| are gettable/settable + * properties and |readonly| are read-only properties. */ function expose(name, cls, exposed) { - var publicClass = createClassWrapper(name, cls); + var publicClass = createClassWrapper(name, cls, exposed.superclass); if ('functions' in exposed) { $Array.forEach(exposed.functions, function(func) { |