1234567891011121314151617181920212223 |
- var RTL$ = {
- extend: function extend(methods){
- function Type(){
- for(var m in methods)
- this[m] = methods[m];
- }
- Type.prototype = this.prototype;
- var result = methods.init;
- result.prototype = new Type(); // inherit this.prototype
- result.prototype.constructor = result; // to see constructor name in diagnostic
-
- result.extend = extend;
- return result;
- },
- assert: function (condition, code){
- if (!condition)
- throw new Error("assertion failed"
- + ((code !== undefined) ? " with code " + code : ""));
- }
- };
- exports.RTL$ = RTL$;
|