UNPKG

webidl-loader

Version:

A web component for loading for webidl wasm applications

1,636 lines (1,393 loc) 114 kB
(function (factory) { typeof define === 'function' && define.amd ? define(factory) : factory(); }(function () { 'use strict'; function allocator() { let allocations = []; let empty = []; return { //allocate a:function(value){ let i = allocations.length; if(empty.length > 0) { i = empty.pop(); } allocations[i] = value; return i; }, //release r(handle){ allocations[handle] = undefined; empty.push(handle); }, //get g(handle){ let ret = allocations[handle]; if(!ret){ console.error(`Asked for ${handle} after it was released.`); } return ret; } } } // THIS FILE IS GENERATED FROM tools/generate_webidl.js function createWebIDLContext() { let ALLOCATOR = allocator(); const webidl = { global_getWindow: function() { return ALLOCATOR.a(window); }, global_release: function(handle) { allocator.r(handle); }, global_createEventListener: function() { let handle = ALLOCATOR.a(e => this.executeCallback(handle, e, ALLOCATOR)); return handle; }, CanvasRenderingContext2D_get_canvas: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.canvas); }, CanvasRenderingContext2D_set_canvas: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.canvas = ALLOCATOR.g(handle); }, CanvasRenderingContext2D_drawWindow: function( instance, window, x, y, w, h, bgColor_start, flags ) { let _instance = ALLOCATOR.g(instance); let _window = ALLOCATOR.g(window); let _x = x; let _y = y; let _w = w; let _h = h; let _bgColor = this.s(bgColor_start); let _flags = flags; _instance.drawWindow(_window, _x, _y, _w, _h, _bgColor, _flags); }, CanvasRenderingContext2D_demote: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.demote(); }, CanvasRenderingContext2D_save: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.save(); }, CanvasRenderingContext2D_restore: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.restore(); }, CanvasRenderingContext2D_scale: function(instance, x, y) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; _instance.scale(_x, _y); }, CanvasRenderingContext2D_rotate: function(instance, angle) { let _instance = ALLOCATOR.g(instance); let _angle = angle; _instance.rotate(_angle); }, CanvasRenderingContext2D_translate: function(instance, x, y) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; _instance.translate(_x, _y); }, CanvasRenderingContext2D_transform: function(instance, a, b, c, d, e, f) { let _instance = ALLOCATOR.g(instance); let _a = a; let _b = b; let _c = c; let _d = d; let _e = e; let _f = f; _instance.transform(_a, _b, _c, _d, _e, _f); }, CanvasRenderingContext2D_setTransform: function( instance, a, b, c, d, e, f ) { let _instance = ALLOCATOR.g(instance); let _a = a; let _b = b; let _c = c; let _d = d; let _e = e; let _f = f; _instance.setTransform(_a, _b, _c, _d, _e, _f); }, CanvasRenderingContext2D_resetTransform: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.resetTransform(); }, CanvasRenderingContext2D_get_globalAlpha: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.globalAlpha; }, CanvasRenderingContext2D_set_globalAlpha: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.globalAlpha = val; }, CanvasRenderingContext2D_get_globalCompositeOperation: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.globalCompositeOperation); }, CanvasRenderingContext2D_set_globalCompositeOperation: function( instance, str ) { let _instance = ALLOCATOR.g(instance); _instance.globalCompositeOperation = this.s(str); }, CanvasRenderingContext2D_get_imageSmoothingEnabled: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.imageSmoothingEnabled; }, CanvasRenderingContext2D_set_imageSmoothingEnabled: function( instance, val ) { let _instance = ALLOCATOR.g(instance); _instance.imageSmoothingEnabled = val; }, CanvasRenderingContext2D_get_strokeStyle: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.strokeStyle); }, CanvasRenderingContext2D_set_strokeStyle: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.strokeStyle = this.s(str); }, CanvasRenderingContext2D_get_fillStyle: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.fillStyle); }, CanvasRenderingContext2D_set_fillStyle: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.fillStyle = this.s(str); }, CanvasRenderingContext2D_createLinearGradient: function( instance, x0, y0, x1, y1 ) { let _instance = ALLOCATOR.g(instance); let _x0 = x0; let _y0 = y0; let _x1 = x1; let _y1 = y1; return ALLOCATOR.a(_instance.createLinearGradient(_x0, _y0, _x1, _y1)); }, CanvasRenderingContext2D_createRadialGradient: function( instance, x0, y0, r0, x1, y1, r1 ) { let _instance = ALLOCATOR.g(instance); let _x0 = x0; let _y0 = y0; let _r0 = r0; let _x1 = x1; let _y1 = y1; let _r1 = r1; return ALLOCATOR.a( _instance.createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) ); }, CanvasRenderingContext2D_createPattern: function( instance, image, repetition_start ) { let _instance = ALLOCATOR.g(instance); let _image = ALLOCATOR.g(image); let _repetition = this.s(repetition_start); return ALLOCATOR.a(_instance.createPattern(_image, _repetition)); }, CanvasRenderingContext2D_get_shadowOffsetX: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.shadowOffsetX; }, CanvasRenderingContext2D_set_shadowOffsetX: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.shadowOffsetX = val; }, CanvasRenderingContext2D_get_shadowOffsetY: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.shadowOffsetY; }, CanvasRenderingContext2D_set_shadowOffsetY: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.shadowOffsetY = val; }, CanvasRenderingContext2D_get_shadowBlur: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.shadowBlur; }, CanvasRenderingContext2D_set_shadowBlur: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.shadowBlur = val; }, CanvasRenderingContext2D_get_shadowColor: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.shadowColor); }, CanvasRenderingContext2D_set_shadowColor: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.shadowColor = this.s(str); }, CanvasRenderingContext2D_get_filter: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.filter); }, CanvasRenderingContext2D_set_filter: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.filter = this.s(str); }, CanvasRenderingContext2D_clearRect: function(instance, x, y, w, h) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; let _w = w; let _h = h; _instance.clearRect(_x, _y, _w, _h); }, CanvasRenderingContext2D_fillRect: function(instance, x, y, w, h) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; let _w = w; let _h = h; _instance.fillRect(_x, _y, _w, _h); }, CanvasRenderingContext2D_strokeRect: function(instance, x, y, w, h) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; let _w = w; let _h = h; _instance.strokeRect(_x, _y, _w, _h); }, CanvasRenderingContext2D_beginPath: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.beginPath(); }, CanvasRenderingContext2D_fill: function(instance, winding) { let _instance = ALLOCATOR.g(instance); let _winding = ALLOCATOR.g(winding); _instance.fill(_winding); }, CanvasRenderingContext2D_fill: function(instance, path, winding) { let _instance = ALLOCATOR.g(instance); let _path = ALLOCATOR.g(path); let _winding = ALLOCATOR.g(winding); _instance.fill(_path, _winding); }, CanvasRenderingContext2D_stroke: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.stroke(); }, CanvasRenderingContext2D_stroke: function(instance, path) { let _instance = ALLOCATOR.g(instance); let _path = ALLOCATOR.g(path); _instance.stroke(_path); }, CanvasRenderingContext2D_clip: function(instance, winding) { let _instance = ALLOCATOR.g(instance); let _winding = ALLOCATOR.g(winding); _instance.clip(_winding); }, CanvasRenderingContext2D_clip: function(instance, path, winding) { let _instance = ALLOCATOR.g(instance); let _path = ALLOCATOR.g(path); let _winding = ALLOCATOR.g(winding); _instance.clip(_path, _winding); }, CanvasRenderingContext2D_isPointInPath: function(instance, x, y, winding) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; let _winding = ALLOCATOR.g(winding); return ALLOCATOR.a(_instance.isPointInPath(_x, _y, _winding)); }, CanvasRenderingContext2D_isPointInPath: function( instance, path, x, y, winding ) { let _instance = ALLOCATOR.g(instance); let _path = ALLOCATOR.g(path); let _x = x; let _y = y; let _winding = ALLOCATOR.g(winding); return ALLOCATOR.a(_instance.isPointInPath(_path, _x, _y, _winding)); }, CanvasRenderingContext2D_isPointInStroke: function(instance, x, y) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; return ALLOCATOR.a(_instance.isPointInStroke(_x, _y)); }, CanvasRenderingContext2D_isPointInStroke: function(instance, path, x, y) { let _instance = ALLOCATOR.g(instance); let _path = ALLOCATOR.g(path); let _x = x; let _y = y; return ALLOCATOR.a(_instance.isPointInStroke(_path, _x, _y)); }, CanvasRenderingContext2D_drawFocusIfNeeded: function(instance, element) { let _instance = ALLOCATOR.g(instance); let _element = ALLOCATOR.g(element); _instance.drawFocusIfNeeded(_element); }, CanvasRenderingContext2D_drawCustomFocusRing: function(instance, element) { let _instance = ALLOCATOR.g(instance); let _element = ALLOCATOR.g(element); return ALLOCATOR.a(_instance.drawCustomFocusRing(_element)); }, CanvasRenderingContext2D_fillText: function( instance, text_start, x, y, maxWidth ) { let _instance = ALLOCATOR.g(instance); let _text = this.s(text_start); let _x = x; let _y = y; let _maxWidth = maxWidth; _instance.fillText(_text, _x, _y, _maxWidth); }, CanvasRenderingContext2D_strokeText: function( instance, text_start, x, y, maxWidth ) { let _instance = ALLOCATOR.g(instance); let _text = this.s(text_start); let _x = x; let _y = y; let _maxWidth = maxWidth; _instance.strokeText(_text, _x, _y, _maxWidth); }, CanvasRenderingContext2D_measureText: function(instance, text_start) { let _instance = ALLOCATOR.g(instance); let _text = this.s(text_start); return ALLOCATOR.a(_instance.measureText(_text)); }, CanvasRenderingContext2D_drawImage: function(instance, image, dx, dy) { let _instance = ALLOCATOR.g(instance); let _image = ALLOCATOR.g(image); let _dx = dx; let _dy = dy; _instance.drawImage(_image, _dx, _dy); }, CanvasRenderingContext2D_drawImage: function( instance, image, dx, dy, dw, dh ) { let _instance = ALLOCATOR.g(instance); let _image = ALLOCATOR.g(image); let _dx = dx; let _dy = dy; let _dw = dw; let _dh = dh; _instance.drawImage(_image, _dx, _dy, _dw, _dh); }, CanvasRenderingContext2D_drawImage: function( instance, image, sx, sy, sw, sh, dx, dy, dw, dh ) { let _instance = ALLOCATOR.g(instance); let _image = ALLOCATOR.g(image); let _sx = sx; let _sy = sy; let _sw = sw; let _sh = sh; let _dx = dx; let _dy = dy; let _dw = dw; let _dh = dh; _instance.drawImage(_image, _sx, _sy, _sw, _sh, _dx, _dy, _dw, _dh); }, CanvasRenderingContext2D_createImageData: function(instance, sw, sh) { let _instance = ALLOCATOR.g(instance); let _sw = sw; let _sh = sh; return ALLOCATOR.a(_instance.createImageData(_sw, _sh)); }, CanvasRenderingContext2D_createImageData: function(instance, imagedata) { let _instance = ALLOCATOR.g(instance); let _imagedata = ALLOCATOR.g(imagedata); return ALLOCATOR.a(_instance.createImageData(_imagedata)); }, CanvasRenderingContext2D_getImageData: function(instance, sx, sy, sw, sh) { let _instance = ALLOCATOR.g(instance); let _sx = sx; let _sy = sy; let _sw = sw; let _sh = sh; return ALLOCATOR.a(_instance.getImageData(_sx, _sy, _sw, _sh)); }, CanvasRenderingContext2D_putImageData: function( instance, imagedata, dx, dy ) { let _instance = ALLOCATOR.g(instance); let _imagedata = ALLOCATOR.g(imagedata); let _dx = dx; let _dy = dy; _instance.putImageData(_imagedata, _dx, _dy); }, CanvasRenderingContext2D_putImageData: function( instance, imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight ) { let _instance = ALLOCATOR.g(instance); let _imagedata = ALLOCATOR.g(imagedata); let _dx = dx; let _dy = dy; let _dirtyX = dirtyX; let _dirtyY = dirtyY; let _dirtyWidth = dirtyWidth; let _dirtyHeight = dirtyHeight; _instance.putImageData( _imagedata, _dx, _dy, _dirtyX, _dirtyY, _dirtyWidth, _dirtyHeight ); }, CanvasRenderingContext2D_get_lineWidth: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.lineWidth; }, CanvasRenderingContext2D_set_lineWidth: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.lineWidth = val; }, CanvasRenderingContext2D_get_lineCap: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.lineCap); }, CanvasRenderingContext2D_set_lineCap: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.lineCap = this.s(str); }, CanvasRenderingContext2D_get_lineJoin: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.lineJoin); }, CanvasRenderingContext2D_set_lineJoin: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.lineJoin = this.s(str); }, CanvasRenderingContext2D_get_miterLimit: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.miterLimit; }, CanvasRenderingContext2D_set_miterLimit: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.miterLimit = val; }, CanvasRenderingContext2D_setLineDash: function(instance, segments) { let _instance = ALLOCATOR.g(instance); let _segments = ALLOCATOR.g(segments); _instance.setLineDash(_segments); }, CanvasRenderingContext2D_getLineDash: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.getLineDash()); }, CanvasRenderingContext2D_get_lineDashOffset: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.lineDashOffset; }, CanvasRenderingContext2D_set_lineDashOffset: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.lineDashOffset = val; }, CanvasRenderingContext2D_get_font: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.font); }, CanvasRenderingContext2D_set_font: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.font = this.s(str); }, CanvasRenderingContext2D_get_textAlign: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.textAlign); }, CanvasRenderingContext2D_set_textAlign: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.textAlign = this.s(str); }, CanvasRenderingContext2D_get_textBaseline: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.textBaseline); }, CanvasRenderingContext2D_set_textBaseline: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.textBaseline = this.s(str); }, CanvasRenderingContext2D_closePath: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.closePath(); }, CanvasRenderingContext2D_moveTo: function(instance, x, y) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; _instance.moveTo(_x, _y); }, CanvasRenderingContext2D_lineTo: function(instance, x, y) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; _instance.lineTo(_x, _y); }, CanvasRenderingContext2D_quadraticCurveTo: function( instance, cpx, cpy, x, y ) { let _instance = ALLOCATOR.g(instance); let _cpx = cpx; let _cpy = cpy; let _x = x; let _y = y; _instance.quadraticCurveTo(_cpx, _cpy, _x, _y); }, CanvasRenderingContext2D_bezierCurveTo: function( instance, cp1x, cp1y, cp2x, cp2y, x, y ) { let _instance = ALLOCATOR.g(instance); let _cp1x = cp1x; let _cp1y = cp1y; let _cp2x = cp2x; let _cp2y = cp2y; let _x = x; let _y = y; _instance.bezierCurveTo(_cp1x, _cp1y, _cp2x, _cp2y, _x, _y); }, CanvasRenderingContext2D_arcTo: function(instance, x1, y1, x2, y2, radius) { let _instance = ALLOCATOR.g(instance); let _x1 = x1; let _y1 = y1; let _x2 = x2; let _y2 = y2; let _radius = radius; _instance.arcTo(_x1, _y1, _x2, _y2, _radius); }, CanvasRenderingContext2D_rect: function(instance, x, y, w, h) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; let _w = w; let _h = h; _instance.rect(_x, _y, _w, _h); }, CanvasRenderingContext2D_arc: function( instance, x, y, radius, startAngle, endAngle, anticlockwise ) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; let _radius = radius; let _startAngle = startAngle; let _endAngle = endAngle; let _anticlockwise = anticlockwise; _instance.arc(_x, _y, _radius, _startAngle, _endAngle, _anticlockwise); }, CanvasRenderingContext2D_ellipse: function( instance, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise ) { let _instance = ALLOCATOR.g(instance); let _x = x; let _y = y; let _radiusX = radiusX; let _radiusY = radiusY; let _rotation = rotation; let _startAngle = startAngle; let _endAngle = endAngle; let _anticlockwise = anticlockwise; _instance.ellipse( _x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise ); }, CanvasRenderingContext2D_addHitRegion: function(instance, options) { let _instance = ALLOCATOR.g(instance); let _options = ALLOCATOR.g(options); _instance.addHitRegion(_options); }, CanvasRenderingContext2D_removeHitRegion: function(instance, id_start) { let _instance = ALLOCATOR.g(instance); let _id = this.s(id_start); _instance.removeHitRegion(_id); }, CanvasRenderingContext2D_clearHitRegions: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.clearHitRegions(); }, CanvasGradient_addColorStop: function(instance, offset, color_start) { let _instance = ALLOCATOR.g(instance); let _offset = offset; let _color = this.s(color_start); _instance.addColorStop(_offset, _color); }, CanvasPattern_setTransform: function(instance, matrix) { let _instance = ALLOCATOR.g(instance); let _matrix = ALLOCATOR.g(matrix); _instance.setTransform(_matrix); }, TextMetrics_get_width: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.width; }, TextMetrics_set_width: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.width = val; }, Path2D_addPath: function(instance, path, transformation) { let _instance = ALLOCATOR.g(instance); let _path = ALLOCATOR.g(path); let _transformation = ALLOCATOR.g(transformation); _instance.addPath(_path, _transformation); }, console_assert: function(condition, message_start) { let _condition = condition; let _message = this.s(message_start); console.assert(_condition, _message); }, console_clear: function() { console.clear(); }, console_count: function(label_start) { let _label = this.s(label_start); console.count(_label); }, console_countReset: function(label_start) { let _label = this.s(label_start); console.countReset(_label); }, console_debug: function(message_start) { let _message = this.s(message_start); console.debug(_message); }, console_error: function(message_start) { let _message = this.s(message_start); console.error(_message); }, console_info: function(message_start) { let _message = this.s(message_start); console.info(_message); }, console_log: function(message_start) { let _message = this.s(message_start); console.log(_message); }, console_table: function(message_start) { let _message = this.s(message_start); console.table(_message); }, console_trace: function(message_start) { let _message = this.s(message_start); console.trace(_message); }, console_warn: function(message_start) { let _message = this.s(message_start); console.warn(_message); }, console_dir: function(message_start) { let _message = this.s(message_start); console.dir(_message); }, console_dirxml: function(message_start) { let _message = this.s(message_start); console.dirxml(_message); }, console_group: function(message_start) { let _message = this.s(message_start); console.group(_message); }, console_groupCollapsed: function(message_start) { let _message = this.s(message_start); console.groupCollapsed(_message); }, console_groupEnd: function() { console.groupEnd(); }, console_time: function(label_start) { let _label = this.s(label_start); console.time(_label); }, console_timeLog: function(label_start, message_start) { let _label = this.s(label_start); let _message = this.s(message_start); console.timeLog(_label, _message); }, console_timeEnd: function(label_start) { let _label = this.s(label_start); console.timeEnd(_label); }, console_exception: function(message_start) { let _message = this.s(message_start); console.exception(_message); }, console_timeStamp: function(message_start) { let _message = this.s(message_start); console.timeStamp(_message); }, console_profile: function(message_start) { let _message = this.s(message_start); console.profile(_message); }, console_profileEnd: function(message_start) { let _message = this.s(message_start); console.profileEnd(_message); }, ConsoleInstance_assert: function(instance, condition, message_start) { let _instance = ALLOCATOR.g(instance); let _condition = condition; let _message = this.s(message_start); _instance.assert(_condition, _message); }, ConsoleInstance_clear: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.clear(); }, ConsoleInstance_count: function(instance, label_start) { let _instance = ALLOCATOR.g(instance); let _label = this.s(label_start); _instance.count(_label); }, ConsoleInstance_countReset: function(instance, label_start) { let _instance = ALLOCATOR.g(instance); let _label = this.s(label_start); _instance.countReset(_label); }, ConsoleInstance_debug: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.debug(_message); }, ConsoleInstance_error: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.error(_message); }, ConsoleInstance_info: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.info(_message); }, ConsoleInstance_log: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.log(_message); }, ConsoleInstance_table: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.table(_message); }, ConsoleInstance_trace: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.trace(_message); }, ConsoleInstance_warn: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.warn(_message); }, ConsoleInstance_dir: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.dir(_message); }, ConsoleInstance_dirxml: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.dirxml(_message); }, ConsoleInstance_group: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.group(_message); }, ConsoleInstance_groupCollapsed: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.groupCollapsed(_message); }, ConsoleInstance_groupEnd: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.groupEnd(); }, ConsoleInstance_time: function(instance, label_start) { let _instance = ALLOCATOR.g(instance); let _label = this.s(label_start); _instance.time(_label); }, ConsoleInstance_timeLog: function(instance, label_start, message_start) { let _instance = ALLOCATOR.g(instance); let _label = this.s(label_start); let _message = this.s(message_start); _instance.timeLog(_label, _message); }, ConsoleInstance_timeEnd: function(instance, label_start) { let _instance = ALLOCATOR.g(instance); let _label = this.s(label_start); _instance.timeEnd(_label); }, ConsoleInstance_exception: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.exception(_message); }, ConsoleInstance_timeStamp: function(instance, data) { let _instance = ALLOCATOR.g(instance); let _data = data; _instance.timeStamp(_data); }, ConsoleInstance_profile: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.profile(_message); }, ConsoleInstance_profileEnd: function(instance, message_start) { let _instance = ALLOCATOR.g(instance); let _message = this.s(message_start); _instance.profileEnd(_message); }, ConsoleInstance_reportForServiceWorkerScope: function( instance, scope_start, message_start, filename_start, lineNumber, columnNumber, level ) { let _instance = ALLOCATOR.g(instance); let _scope = this.s(scope_start); let _message = this.s(message_start); let _filename = this.s(filename_start); let _lineNumber = lineNumber; let _columnNumber = columnNumber; let _level = ALLOCATOR.g(level); _instance.reportForServiceWorkerScope( _scope, _message, _filename, _lineNumber, _columnNumber, _level ); }, Document_get_implementation: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.implementation); }, Document_set_implementation: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.implementation = ALLOCATOR.g(handle); }, Document_get_URL: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.URL); }, Document_set_URL: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.URL = this.s(str); }, Document_get_documentURI: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.documentURI); }, Document_set_documentURI: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.documentURI = this.s(str); }, Document_get_compatMode: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.compatMode); }, Document_set_compatMode: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.compatMode = this.s(str); }, Document_get_characterSet: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.characterSet); }, Document_set_characterSet: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.characterSet = this.s(str); }, Document_get_charset: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.charset); }, Document_set_charset: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.charset = this.s(str); }, Document_get_inputEncoding: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.inputEncoding); }, Document_set_inputEncoding: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.inputEncoding = this.s(str); }, Document_get_contentType: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.contentType); }, Document_set_contentType: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.contentType = this.s(str); }, Document_get_doctype: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.doctype); }, Document_set_doctype: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.doctype = ALLOCATOR.g(handle); }, Document_get_documentElement: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.documentElement); }, Document_set_documentElement: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.documentElement = ALLOCATOR.g(handle); }, Document_getElementsByTagName: function(instance, localName_start) { let _instance = ALLOCATOR.g(instance); let _localName = this.s(localName_start); return ALLOCATOR.a(_instance.getElementsByTagName(_localName)); }, Document_getElementsByTagNameNS: function( instance, namespace_start, localName_start ) { let _instance = ALLOCATOR.g(instance); let _namespace = this.s(namespace_start); let _localName = this.s(localName_start); return ALLOCATOR.a( _instance.getElementsByTagNameNS(_namespace, _localName) ); }, Document_getElementsByClassName: function(instance, classNames_start) { let _instance = ALLOCATOR.g(instance); let _classNames = this.s(classNames_start); return ALLOCATOR.a(_instance.getElementsByClassName(_classNames)); }, Document_getElementById: function(instance, elementId_start) { let _instance = ALLOCATOR.g(instance); let _elementId = this.s(elementId_start); return ALLOCATOR.a(_instance.getElementById(_elementId)); }, Document_createElement: function(instance, localName_start, options) { let _instance = ALLOCATOR.g(instance); let _localName = this.s(localName_start); let _options = ALLOCATOR.g(options); return ALLOCATOR.a(_instance.createElement(_localName, _options)); }, Document_createElementNS: function( instance, namespace_start, qualifiedName_start, options ) { let _instance = ALLOCATOR.g(instance); let _namespace = this.s(namespace_start); let _qualifiedName = this.s(qualifiedName_start); let _options = ALLOCATOR.g(options); return ALLOCATOR.a( _instance.createElementNS(_namespace, _qualifiedName, _options) ); }, Document_createDocumentFragment: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.createDocumentFragment()); }, Document_createTextNode: function(instance, data_start) { let _instance = ALLOCATOR.g(instance); let _data = this.s(data_start); return ALLOCATOR.a(_instance.createTextNode(_data)); }, Document_createComment: function(instance, data_start) { let _instance = ALLOCATOR.g(instance); let _data = this.s(data_start); return ALLOCATOR.a(_instance.createComment(_data)); }, Document_createProcessingInstruction: function( instance, target_start, data_start ) { let _instance = ALLOCATOR.g(instance); let _target = this.s(target_start); let _data = this.s(data_start); return ALLOCATOR.a(_instance.createProcessingInstruction(_target, _data)); }, Document_importNode: function(instance, node, deep) { let _instance = ALLOCATOR.g(instance); let _node = ALLOCATOR.g(node); let _deep = deep; return ALLOCATOR.a(_instance.importNode(_node, _deep)); }, Document_adoptNode: function(instance, node) { let _instance = ALLOCATOR.g(instance); let _node = ALLOCATOR.g(node); return ALLOCATOR.a(_instance.adoptNode(_node)); }, Document_createEvent: function(instance, interface_start) { let _instance = ALLOCATOR.g(instance); let _interface = this.s(interface_start); return ALLOCATOR.a(_instance.createEvent(_interface)); }, Document_createRange: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.createRange()); }, Document_createNodeIterator: function(instance, root, whatToShow, filter) { let _instance = ALLOCATOR.g(instance); let _root = ALLOCATOR.g(root); let _whatToShow = whatToShow; let _filter = ALLOCATOR.g(filter); return ALLOCATOR.a( _instance.createNodeIterator(_root, _whatToShow, _filter) ); }, Document_createTreeWalker: function(instance, root, whatToShow, filter) { let _instance = ALLOCATOR.g(instance); let _root = ALLOCATOR.g(root); let _whatToShow = whatToShow; let _filter = ALLOCATOR.g(filter); return ALLOCATOR.a( _instance.createTreeWalker(_root, _whatToShow, _filter) ); }, Document_createCDATASection: function(instance, data_start) { let _instance = ALLOCATOR.g(instance); let _data = this.s(data_start); return ALLOCATOR.a(_instance.createCDATASection(_data)); }, Document_createAttribute: function(instance, name_start) { let _instance = ALLOCATOR.g(instance); let _name = this.s(name_start); return ALLOCATOR.a(_instance.createAttribute(_name)); }, Document_createAttributeNS: function( instance, namespace_start, name_start ) { let _instance = ALLOCATOR.g(instance); let _namespace = this.s(namespace_start); let _name = this.s(name_start); return ALLOCATOR.a(_instance.createAttributeNS(_namespace, _name)); }, Document_get_location: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.location); }, Document_set_location: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.location = ALLOCATOR.g(handle); }, Document_get_referrer: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.referrer); }, Document_set_referrer: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.referrer = this.s(str); }, Document_get_lastModified: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.lastModified); }, Document_set_lastModified: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.lastModified = this.s(str); }, Document_get_readyState: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.readyState); }, Document_set_readyState: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.readyState = this.s(str); }, Document_get_title: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.title); }, Document_set_title: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.title = this.s(str); }, Document_get_dir: function(instance) { let _instance = ALLOCATOR.g(instance); return this.ms(_instance.dir); }, Document_set_dir: function(instance, str) { let _instance = ALLOCATOR.g(instance); _instance.dir = this.s(str); }, Document_get_body: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.body); }, Document_set_body: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.body = ALLOCATOR.g(handle); }, Document_get_head: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.head); }, Document_set_head: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.head = ALLOCATOR.g(handle); }, Document_get_images: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.images); }, Document_set_images: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.images = ALLOCATOR.g(handle); }, Document_get_embeds: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.embeds); }, Document_set_embeds: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.embeds = ALLOCATOR.g(handle); }, Document_get_plugins: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.plugins); }, Document_set_plugins: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.plugins = ALLOCATOR.g(handle); }, Document_get_links: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.links); }, Document_set_links: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.links = ALLOCATOR.g(handle); }, Document_get_forms: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.forms); }, Document_set_forms: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.forms = ALLOCATOR.g(handle); }, Document_get_scripts: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.scripts); }, Document_set_scripts: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.scripts = ALLOCATOR.g(handle); }, Document_getElementsByName: function(instance, elementName_start) { let _instance = ALLOCATOR.g(instance); let _elementName = this.s(elementName_start); return ALLOCATOR.a(_instance.getElementsByName(_elementName)); }, Document_get_defaultView: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.defaultView); }, Document_set_defaultView: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.defaultView = ALLOCATOR.g(handle); }, Document_hasFocus: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.hasFocus()); }, Document_get_onreadystatechange: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.onreadystatechange); }, Document_set_onreadystatechange: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.onreadystatechange = ALLOCATOR.g(handle); }, Document_get_onbeforescriptexecute: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.onbeforescriptexecute); }, Document_set_onbeforescriptexecute: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.onbeforescriptexecute = ALLOCATOR.g(handle); }, Document_get_onafterscriptexecute: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.onafterscriptexecute); }, Document_set_onafterscriptexecute: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.onafterscriptexecute = ALLOCATOR.g(handle); }, Document_get_onselectionchange: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.onselectionchange); }, Document_set_onselectionchange: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.onselectionchange = ALLOCATOR.g(handle); }, Document_get_currentScript: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.currentScript); }, Document_set_currentScript: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.currentScript = ALLOCATOR.g(handle); }, Document_releaseCapture: function(instance) { let _instance = ALLOCATOR.g(instance); _instance.releaseCapture(); }, Document_get_documentURIObject: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.documentURIObject); }, Document_set_documentURIObject: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.documentURIObject = ALLOCATOR.g(handle); }, Document_get_referrerPolicy: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.referrerPolicy; }, Document_set_referrerPolicy: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.referrerPolicy = val; }, Document_get_anchors: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.anchors); }, Document_set_anchors: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.anchors = ALLOCATOR.g(handle); }, Document_get_applets: function(instance) { let _instance = ALLOCATOR.g(instance); return ALLOCATOR.a(_instance.applets); }, Document_set_applets: function(instance, handle) { let _instance = ALLOCATOR.g(instance); _instance.applets = ALLOCATOR.g(handle); }, Document_get_fullscreen: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.fullscreen; }, Document_set_fullscreen: function(instance, val) { let _instance = ALLOCATOR.g(instance); _instance.fullscreen = val; }, Document_get_fullscreenEnabled: function(instance) { let _instance = ALLOCATOR.g(instance); return _instance.fullscreenEnabled; }, Document_set_fullscreenEnabled: function(instance, val) { let _insta