You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
marcoscaceres edited this page Jan 18, 2013
·
5 revisions
Below is a template that can be copied for defining a new type. Just replace XXX for the type you want to define.
/*Copy section 3.X from WebIDL spec that defines the type. */define(function(require){'use strict';varIDLType=require('types/IDLType'),WebIDL=require('interfaces/WebIDL');WebIDL.XXX=function(value){if(!(thisinstanceofWebIDL.XXX)){returntoXXX(value);}//call super constructorIDLType.call("XXX",toXXX);this.value=value;};/* Copy section 4.x from WebIDL that defines the conversion. */functiontoXXX(V){}WebIDL.XXX.prototype=IDLType;});