How to use web method in root

Best JavaScript code snippet using root

webgl.js

Source:webgl.js Github

copy

Full Screen

1/*2 * Copyright 2010 The Closure Compiler Authors3 *4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 *8 * http://www.apache.org/licenses/LICENSE-2.09 *10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */16/**17 * @fileoverview Definitions for WebGL functions as described at18 * http://www.khronos.org/registry/webgl/specs/latest/19 *20 * This file is current up to the WebGL 1.0.1 spec, including extensions.21 *22 * This relies on html5.js being included for Canvas and Typed Array support.23 *24 * This includes some extensions defined at25 * http://www.khronos.org/registry/webgl/extensions/26 *27 * @externs28 */29/**30 * @constructor31 * @noalias32 */33function WebGLRenderingContext() {}34/** @type {number} */35WebGLRenderingContext.DEPTH_BUFFER_BIT;36/** @type {number} */37WebGLRenderingContext.STENCIL_BUFFER_BIT;38/** @type {number} */39WebGLRenderingContext.COLOR_BUFFER_BIT;40/** @type {number} */41WebGLRenderingContext.POINTS;42/** @type {number} */43WebGLRenderingContext.LINES;44/** @type {number} */45WebGLRenderingContext.LINE_LOOP;46/** @type {number} */47WebGLRenderingContext.LINE_STRIP;48/** @type {number} */49WebGLRenderingContext.TRIANGLES;50/** @type {number} */51WebGLRenderingContext.TRIANGLE_STRIP;52/** @type {number} */53WebGLRenderingContext.TRIANGLE_FAN;54/** @type {number} */55WebGLRenderingContext.ZERO;56/** @type {number} */57WebGLRenderingContext.ONE;58/** @type {number} */59WebGLRenderingContext.SRC_COLOR;60/** @type {number} */61WebGLRenderingContext.ONE_MINUS_SRC_COLOR;62/** @type {number} */63WebGLRenderingContext.SRC_ALPHA;64/** @type {number} */65WebGLRenderingContext.ONE_MINUS_SRC_ALPHA;66/** @type {number} */67WebGLRenderingContext.DST_ALPHA;68/** @type {number} */69WebGLRenderingContext.ONE_MINUS_DST_ALPHA;70/** @type {number} */71WebGLRenderingContext.DST_COLOR;72/** @type {number} */73WebGLRenderingContext.ONE_MINUS_DST_COLOR;74/** @type {number} */75WebGLRenderingContext.SRC_ALPHA_SATURATE;76/** @type {number} */77WebGLRenderingContext.FUNC_ADD;78/** @type {number} */79WebGLRenderingContext.BLEND_EQUATION;80/** @type {number} */81WebGLRenderingContext.BLEND_EQUATION_RGB;82/** @type {number} */83WebGLRenderingContext.BLEND_EQUATION_ALPHA;84/** @type {number} */85WebGLRenderingContext.FUNC_SUBTRACT;86/** @type {number} */87WebGLRenderingContext.FUNC_REVERSE_SUBTRACT;88/** @type {number} */89WebGLRenderingContext.BLEND_DST_RGB;90/** @type {number} */91WebGLRenderingContext.BLEND_SRC_RGB;92/** @type {number} */93WebGLRenderingContext.BLEND_DST_ALPHA;94/** @type {number} */95WebGLRenderingContext.BLEND_SRC_ALPHA;96/** @type {number} */97WebGLRenderingContext.CONSTANT_COLOR;98/** @type {number} */99WebGLRenderingContext.ONE_MINUS_CONSTANT_COLOR;100/** @type {number} */101WebGLRenderingContext.CONSTANT_ALPHA;102/** @type {number} */103WebGLRenderingContext.ONE_MINUS_CONSTANT_ALPHA;104/** @type {number} */105WebGLRenderingContext.BLEND_COLOR;106/** @type {number} */107WebGLRenderingContext.ARRAY_BUFFER;108/** @type {number} */109WebGLRenderingContext.ELEMENT_ARRAY_BUFFER;110/** @type {number} */111WebGLRenderingContext.ARRAY_BUFFER_BINDING;112/** @type {number} */113WebGLRenderingContext.ELEMENT_ARRAY_BUFFER_BINDING;114/** @type {number} */115WebGLRenderingContext.STREAM_DRAW;116/** @type {number} */117WebGLRenderingContext.STATIC_DRAW;118/** @type {number} */119WebGLRenderingContext.DYNAMIC_DRAW;120/** @type {number} */121WebGLRenderingContext.BUFFER_SIZE;122/** @type {number} */123WebGLRenderingContext.BUFFER_USAGE;124/** @type {number} */125WebGLRenderingContext.CURRENT_VERTEX_ATTRIB;126/** @type {number} */127WebGLRenderingContext.FRONT;128/** @type {number} */129WebGLRenderingContext.BACK;130/** @type {number} */131WebGLRenderingContext.FRONT_AND_BACK;132/** @type {number} */133WebGLRenderingContext.CULL_FACE;134/** @type {number} */135WebGLRenderingContext.BLEND;136/** @type {number} */137WebGLRenderingContext.DITHER;138/** @type {number} */139WebGLRenderingContext.STENCIL_TEST;140/** @type {number} */141WebGLRenderingContext.DEPTH_TEST;142/** @type {number} */143WebGLRenderingContext.SCISSOR_TEST;144/** @type {number} */145WebGLRenderingContext.POLYGON_OFFSET_FILL;146/** @type {number} */147WebGLRenderingContext.SAMPLE_ALPHA_TO_COVERAGE;148/** @type {number} */149WebGLRenderingContext.SAMPLE_COVERAGE;150/** @type {number} */151WebGLRenderingContext.NO_ERROR;152/** @type {number} */153WebGLRenderingContext.INVALID_ENUM;154/** @type {number} */155WebGLRenderingContext.INVALID_VALUE;156/** @type {number} */157WebGLRenderingContext.INVALID_OPERATION;158/** @type {number} */159WebGLRenderingContext.OUT_OF_MEMORY;160/** @type {number} */161WebGLRenderingContext.CW;162/** @type {number} */163WebGLRenderingContext.CCW;164/** @type {number} */165WebGLRenderingContext.LINE_WIDTH;166/** @type {number} */167WebGLRenderingContext.ALIASED_POINT_SIZE_RANGE;168/** @type {number} */169WebGLRenderingContext.ALIASED_LINE_WIDTH_RANGE;170/** @type {number} */171WebGLRenderingContext.CULL_FACE_MODE;172/** @type {number} */173WebGLRenderingContext.FRONT_FACE;174/** @type {number} */175WebGLRenderingContext.DEPTH_RANGE;176/** @type {number} */177WebGLRenderingContext.DEPTH_WRITEMASK;178/** @type {number} */179WebGLRenderingContext.DEPTH_CLEAR_VALUE;180/** @type {number} */181WebGLRenderingContext.DEPTH_FUNC;182/** @type {number} */183WebGLRenderingContext.STENCIL_CLEAR_VALUE;184/** @type {number} */185WebGLRenderingContext.STENCIL_FUNC;186/** @type {number} */187WebGLRenderingContext.STENCIL_FAIL;188/** @type {number} */189WebGLRenderingContext.STENCIL_PASS_DEPTH_FAIL;190/** @type {number} */191WebGLRenderingContext.STENCIL_PASS_DEPTH_PASS;192/** @type {number} */193WebGLRenderingContext.STENCIL_REF;194/** @type {number} */195WebGLRenderingContext.STENCIL_VALUE_MASK;196/** @type {number} */197WebGLRenderingContext.STENCIL_WRITEMASK;198/** @type {number} */199WebGLRenderingContext.STENCIL_BACK_FUNC;200/** @type {number} */201WebGLRenderingContext.STENCIL_BACK_FAIL;202/** @type {number} */203WebGLRenderingContext.STENCIL_BACK_PASS_DEPTH_FAIL;204/** @type {number} */205WebGLRenderingContext.STENCIL_BACK_PASS_DEPTH_PASS;206/** @type {number} */207WebGLRenderingContext.STENCIL_BACK_REF;208/** @type {number} */209WebGLRenderingContext.STENCIL_BACK_VALUE_MASK;210/** @type {number} */211WebGLRenderingContext.STENCIL_BACK_WRITEMASK;212/** @type {number} */213WebGLRenderingContext.VIEWPORT;214/** @type {number} */215WebGLRenderingContext.SCISSOR_BOX;216/** @type {number} */217WebGLRenderingContext.COLOR_CLEAR_VALUE;218/** @type {number} */219WebGLRenderingContext.COLOR_WRITEMASK;220/** @type {number} */221WebGLRenderingContext.UNPACK_ALIGNMENT;222/** @type {number} */223WebGLRenderingContext.PACK_ALIGNMENT;224/** @type {number} */225WebGLRenderingContext.MAX_TEXTURE_SIZE;226/** @type {number} */227WebGLRenderingContext.MAX_VIEWPORT_DIMS;228/** @type {number} */229WebGLRenderingContext.SUBPIXEL_BITS;230/** @type {number} */231WebGLRenderingContext.RED_BITS;232/** @type {number} */233WebGLRenderingContext.GREEN_BITS;234/** @type {number} */235WebGLRenderingContext.BLUE_BITS;236/** @type {number} */237WebGLRenderingContext.ALPHA_BITS;238/** @type {number} */239WebGLRenderingContext.DEPTH_BITS;240/** @type {number} */241WebGLRenderingContext.STENCIL_BITS;242/** @type {number} */243WebGLRenderingContext.POLYGON_OFFSET_UNITS;244/** @type {number} */245WebGLRenderingContext.POLYGON_OFFSET_FACTOR;246/** @type {number} */247WebGLRenderingContext.TEXTURE_BINDING_2D;248/** @type {number} */249WebGLRenderingContext.SAMPLE_BUFFERS;250/** @type {number} */251WebGLRenderingContext.SAMPLES;252/** @type {number} */253WebGLRenderingContext.SAMPLE_COVERAGE_VALUE;254/** @type {number} */255WebGLRenderingContext.SAMPLE_COVERAGE_INVERT;256/** @type {number} */257WebGLRenderingContext.COMPRESSED_TEXTURE_FORMATS;258/** @type {number} */259WebGLRenderingContext.DONT_CARE;260/** @type {number} */261WebGLRenderingContext.FASTEST;262/** @type {number} */263WebGLRenderingContext.NICEST;264/** @type {number} */265WebGLRenderingContext.GENERATE_MIPMAP_HINT;266/** @type {number} */267WebGLRenderingContext.BYTE;268/** @type {number} */269WebGLRenderingContext.UNSIGNED_BYTE;270/** @type {number} */271WebGLRenderingContext.SHORT;272/** @type {number} */273WebGLRenderingContext.UNSIGNED_SHORT;274/** @type {number} */275WebGLRenderingContext.INT;276/** @type {number} */277WebGLRenderingContext.UNSIGNED_INT;278/** @type {number} */279WebGLRenderingContext.FLOAT;280/** @type {number} */281WebGLRenderingContext.DEPTH_COMPONENT;282/** @type {number} */283WebGLRenderingContext.ALPHA;284/** @type {number} */285WebGLRenderingContext.RGB;286/** @type {number} */287WebGLRenderingContext.RGBA;288/** @type {number} */289WebGLRenderingContext.LUMINANCE;290/** @type {number} */291WebGLRenderingContext.LUMINANCE_ALPHA;292/** @type {number} */293WebGLRenderingContext.UNSIGNED_SHORT_4_4_4_4;294/** @type {number} */295WebGLRenderingContext.UNSIGNED_SHORT_5_5_5_1;296/** @type {number} */297WebGLRenderingContext.UNSIGNED_SHORT_5_6_5;298/** @type {number} */299WebGLRenderingContext.FRAGMENT_SHADER;300/** @type {number} */301WebGLRenderingContext.VERTEX_SHADER;302/** @type {number} */303WebGLRenderingContext.MAX_VERTEX_ATTRIBS;304/** @type {number} */305WebGLRenderingContext.MAX_VERTEX_UNIFORM_VECTORS;306/** @type {number} */307WebGLRenderingContext.MAX_VARYING_VECTORS;308/** @type {number} */309WebGLRenderingContext.MAX_COMBINED_TEXTURE_IMAGE_UNITS;310/** @type {number} */311WebGLRenderingContext.MAX_VERTEX_TEXTURE_IMAGE_UNITS;312/** @type {number} */313WebGLRenderingContext.MAX_TEXTURE_IMAGE_UNITS;314/** @type {number} */315WebGLRenderingContext.MAX_FRAGMENT_UNIFORM_VECTORS;316/** @type {number} */317WebGLRenderingContext.SHADER_TYPE;318/** @type {number} */319WebGLRenderingContext.DELETE_STATUS;320/** @type {number} */321WebGLRenderingContext.LINK_STATUS;322/** @type {number} */323WebGLRenderingContext.VALIDATE_STATUS;324/** @type {number} */325WebGLRenderingContext.ATTACHED_SHADERS;326/** @type {number} */327WebGLRenderingContext.ACTIVE_UNIFORMS;328/** @type {number} */329WebGLRenderingContext.ACTIVE_ATTRIBUTES;330/** @type {number} */331WebGLRenderingContext.SHADING_LANGUAGE_VERSION;332/** @type {number} */333WebGLRenderingContext.CURRENT_PROGRAM;334/** @type {number} */335WebGLRenderingContext.NEVER;336/** @type {number} */337WebGLRenderingContext.LESS;338/** @type {number} */339WebGLRenderingContext.EQUAL;340/** @type {number} */341WebGLRenderingContext.LEQUAL;342/** @type {number} */343WebGLRenderingContext.GREATER;344/** @type {number} */345WebGLRenderingContext.NOTEQUAL;346/** @type {number} */347WebGLRenderingContext.GEQUAL;348/** @type {number} */349WebGLRenderingContext.ALWAYS;350/** @type {number} */351WebGLRenderingContext.KEEP;352/** @type {number} */353WebGLRenderingContext.REPLACE;354/** @type {number} */355WebGLRenderingContext.INCR;356/** @type {number} */357WebGLRenderingContext.DECR;358/** @type {number} */359WebGLRenderingContext.INVERT;360/** @type {number} */361WebGLRenderingContext.INCR_WRAP;362/** @type {number} */363WebGLRenderingContext.DECR_WRAP;364/** @type {number} */365WebGLRenderingContext.VENDOR;366/** @type {number} */367WebGLRenderingContext.RENDERER;368/** @type {number} */369WebGLRenderingContext.VERSION;370/** @type {number} */371WebGLRenderingContext.NEAREST;372/** @type {number} */373WebGLRenderingContext.LINEAR;374/** @type {number} */375WebGLRenderingContext.NEAREST_MIPMAP_NEAREST;376/** @type {number} */377WebGLRenderingContext.LINEAR_MIPMAP_NEAREST;378/** @type {number} */379WebGLRenderingContext.NEAREST_MIPMAP_LINEAR;380/** @type {number} */381WebGLRenderingContext.LINEAR_MIPMAP_LINEAR;382/** @type {number} */383WebGLRenderingContext.TEXTURE_MAG_FILTER;384/** @type {number} */385WebGLRenderingContext.TEXTURE_MIN_FILTER;386/** @type {number} */387WebGLRenderingContext.TEXTURE_WRAP_S;388/** @type {number} */389WebGLRenderingContext.TEXTURE_WRAP_T;390/** @type {number} */391WebGLRenderingContext.TEXTURE_2D;392/** @type {number} */393WebGLRenderingContext.TEXTURE;394/** @type {number} */395WebGLRenderingContext.TEXTURE_CUBE_MAP;396/** @type {number} */397WebGLRenderingContext.TEXTURE_BINDING_CUBE_MAP;398/** @type {number} */399WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_X;400/** @type {number} */401WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_X;402/** @type {number} */403WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Y;404/** @type {number} */405WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Y;406/** @type {number} */407WebGLRenderingContext.TEXTURE_CUBE_MAP_POSITIVE_Z;408/** @type {number} */409WebGLRenderingContext.TEXTURE_CUBE_MAP_NEGATIVE_Z;410/** @type {number} */411WebGLRenderingContext.MAX_CUBE_MAP_TEXTURE_SIZE;412/** @type {number} */413WebGLRenderingContext.TEXTURE0;414/** @type {number} */415WebGLRenderingContext.TEXTURE1;416/** @type {number} */417WebGLRenderingContext.TEXTURE2;418/** @type {number} */419WebGLRenderingContext.TEXTURE3;420/** @type {number} */421WebGLRenderingContext.TEXTURE4;422/** @type {number} */423WebGLRenderingContext.TEXTURE5;424/** @type {number} */425WebGLRenderingContext.TEXTURE6;426/** @type {number} */427WebGLRenderingContext.TEXTURE7;428/** @type {number} */429WebGLRenderingContext.TEXTURE8;430/** @type {number} */431WebGLRenderingContext.TEXTURE9;432/** @type {number} */433WebGLRenderingContext.TEXTURE10;434/** @type {number} */435WebGLRenderingContext.TEXTURE11;436/** @type {number} */437WebGLRenderingContext.TEXTURE12;438/** @type {number} */439WebGLRenderingContext.TEXTURE13;440/** @type {number} */441WebGLRenderingContext.TEXTURE14;442/** @type {number} */443WebGLRenderingContext.TEXTURE15;444/** @type {number} */445WebGLRenderingContext.TEXTURE16;446/** @type {number} */447WebGLRenderingContext.TEXTURE17;448/** @type {number} */449WebGLRenderingContext.TEXTURE18;450/** @type {number} */451WebGLRenderingContext.TEXTURE19;452/** @type {number} */453WebGLRenderingContext.TEXTURE20;454/** @type {number} */455WebGLRenderingContext.TEXTURE21;456/** @type {number} */457WebGLRenderingContext.TEXTURE22;458/** @type {number} */459WebGLRenderingContext.TEXTURE23;460/** @type {number} */461WebGLRenderingContext.TEXTURE24;462/** @type {number} */463WebGLRenderingContext.TEXTURE25;464/** @type {number} */465WebGLRenderingContext.TEXTURE26;466/** @type {number} */467WebGLRenderingContext.TEXTURE27;468/** @type {number} */469WebGLRenderingContext.TEXTURE28;470/** @type {number} */471WebGLRenderingContext.TEXTURE29;472/** @type {number} */473WebGLRenderingContext.TEXTURE30;474/** @type {number} */475WebGLRenderingContext.TEXTURE31;476/** @type {number} */477WebGLRenderingContext.ACTIVE_TEXTURE;478/** @type {number} */479WebGLRenderingContext.REPEAT;480/** @type {number} */481WebGLRenderingContext.CLAMP_TO_EDGE;482/** @type {number} */483WebGLRenderingContext.MIRRORED_REPEAT;484/** @type {number} */485WebGLRenderingContext.FLOAT_VEC2;486/** @type {number} */487WebGLRenderingContext.FLOAT_VEC3;488/** @type {number} */489WebGLRenderingContext.FLOAT_VEC4;490/** @type {number} */491WebGLRenderingContext.INT_VEC2;492/** @type {number} */493WebGLRenderingContext.INT_VEC3;494/** @type {number} */495WebGLRenderingContext.INT_VEC4;496/** @type {number} */497WebGLRenderingContext.BOOL;498/** @type {number} */499WebGLRenderingContext.BOOL_VEC2;500/** @type {number} */501WebGLRenderingContext.BOOL_VEC3;502/** @type {number} */503WebGLRenderingContext.BOOL_VEC4;504/** @type {number} */505WebGLRenderingContext.FLOAT_MAT2;506/** @type {number} */507WebGLRenderingContext.FLOAT_MAT3;508/** @type {number} */509WebGLRenderingContext.FLOAT_MAT4;510/** @type {number} */511WebGLRenderingContext.SAMPLER_2D;512/** @type {number} */513WebGLRenderingContext.SAMPLER_CUBE;514/** @type {number} */515WebGLRenderingContext.VERTEX_ATTRIB_ARRAY_ENABLED;516/** @type {number} */517WebGLRenderingContext.VERTEX_ATTRIB_ARRAY_SIZE;518/** @type {number} */519WebGLRenderingContext.VERTEX_ATTRIB_ARRAY_STRIDE;520/** @type {number} */521WebGLRenderingContext.VERTEX_ATTRIB_ARRAY_TYPE;522/** @type {number} */523WebGLRenderingContext.VERTEX_ATTRIB_ARRAY_NORMALIZED;524/** @type {number} */525WebGLRenderingContext.VERTEX_ATTRIB_ARRAY_POINTER;526/** @type {number} */527WebGLRenderingContext.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING;528/** @type {number} */529WebGLRenderingContext.IMPLEMENTATION_COLOR_READ_FORMAT;530/** @type {number} */531WebGLRenderingContext.IMPLEMENTATION_COLOR_READ_TYPE;532/** @type {number} */533WebGLRenderingContext.COMPILE_STATUS;534/** @type {number} */535WebGLRenderingContext.LOW_FLOAT;536/** @type {number} */537WebGLRenderingContext.MEDIUM_FLOAT;538/** @type {number} */539WebGLRenderingContext.HIGH_FLOAT;540/** @type {number} */541WebGLRenderingContext.LOW_INT;542/** @type {number} */543WebGLRenderingContext.MEDIUM_INT;544/** @type {number} */545WebGLRenderingContext.HIGH_INT;546/** @type {number} */547WebGLRenderingContext.FRAMEBUFFER;548/** @type {number} */549WebGLRenderingContext.RENDERBUFFER;550/** @type {number} */551WebGLRenderingContext.RGBA4;552/** @type {number} */553WebGLRenderingContext.RGB5_A1;554/** @type {number} */555WebGLRenderingContext.RGB565;556/** @type {number} */557WebGLRenderingContext.DEPTH_COMPONENT16;558/** @type {number} */559WebGLRenderingContext.STENCIL_INDEX;560/** @type {number} */561WebGLRenderingContext.STENCIL_INDEX8;562/** @type {number} */563WebGLRenderingContext.DEPTH_STENCIL;564/** @type {number} */565WebGLRenderingContext.RENDERBUFFER_WIDTH;566/** @type {number} */567WebGLRenderingContext.RENDERBUFFER_HEIGHT;568/** @type {number} */569WebGLRenderingContext.RENDERBUFFER_INTERNAL_FORMAT;570/** @type {number} */571WebGLRenderingContext.RENDERBUFFER_RED_SIZE;572/** @type {number} */573WebGLRenderingContext.RENDERBUFFER_GREEN_SIZE;574/** @type {number} */575WebGLRenderingContext.RENDERBUFFER_BLUE_SIZE;576/** @type {number} */577WebGLRenderingContext.RENDERBUFFER_ALPHA_SIZE;578/** @type {number} */579WebGLRenderingContext.RENDERBUFFER_DEPTH_SIZE;580/** @type {number} */581WebGLRenderingContext.RENDERBUFFER_STENCIL_SIZE;582/** @type {number} */583WebGLRenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE;584/** @type {number} */585WebGLRenderingContext.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME;586/** @type {number} */587WebGLRenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL;588/** @type {number} */589WebGLRenderingContext.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE;590/** @type {number} */591WebGLRenderingContext.COLOR_ATTACHMENT0;592/** @type {number} */593WebGLRenderingContext.DEPTH_ATTACHMENT;594/** @type {number} */595WebGLRenderingContext.STENCIL_ATTACHMENT;596/** @type {number} */597WebGLRenderingContext.DEPTH_STENCIL_ATTACHMENT;598/** @type {number} */599WebGLRenderingContext.NONE;600/** @type {number} */601WebGLRenderingContext.FRAMEBUFFER_COMPLETE;602/** @type {number} */603WebGLRenderingContext.FRAMEBUFFER_INCOMPLETE_ATTACHMENT;604/** @type {number} */605WebGLRenderingContext.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;606/** @type {number} */607WebGLRenderingContext.FRAMEBUFFER_INCOMPLETE_DIMENSIONS;608/** @type {number} */609WebGLRenderingContext.FRAMEBUFFER_UNSUPPORTED;610/** @type {number} */611WebGLRenderingContext.FRAMEBUFFER_BINDING;612/** @type {number} */613WebGLRenderingContext.RENDERBUFFER_BINDING;614/** @type {number} */615WebGLRenderingContext.MAX_RENDERBUFFER_SIZE;616/** @type {number} */617WebGLRenderingContext.INVALID_FRAMEBUFFER_OPERATION;618/** @type {number} */619WebGLRenderingContext.UNPACK_FLIP_Y_WEBGL;620/** @type {number} */621WebGLRenderingContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL;622/** @type {number} */623WebGLRenderingContext.CONTEXT_LOST_WEBGL;624/** @type {number} */625WebGLRenderingContext.UNPACK_COLORSPACE_CONVERSION_WEBGL;626/** @type {number} */627WebGLRenderingContext.BROWSER_DEFAULT_WEBGL;628/** @type {number} */629WebGLRenderingContext.prototype.DEPTH_BUFFER_BIT;630/** @type {number} */631WebGLRenderingContext.prototype.STENCIL_BUFFER_BIT;632/** @type {number} */633WebGLRenderingContext.prototype.COLOR_BUFFER_BIT;634/** @type {number} */635WebGLRenderingContext.prototype.POINTS;636/** @type {number} */637WebGLRenderingContext.prototype.LINES;638/** @type {number} */639WebGLRenderingContext.prototype.LINE_LOOP;640/** @type {number} */641WebGLRenderingContext.prototype.LINE_STRIP;642/** @type {number} */643WebGLRenderingContext.prototype.TRIANGLES;644/** @type {number} */645WebGLRenderingContext.prototype.TRIANGLE_STRIP;646/** @type {number} */647WebGLRenderingContext.prototype.TRIANGLE_FAN;648/** @type {number} */649WebGLRenderingContext.prototype.ZERO;650/** @type {number} */651WebGLRenderingContext.prototype.ONE;652/** @type {number} */653WebGLRenderingContext.prototype.SRC_COLOR;654/** @type {number} */655WebGLRenderingContext.prototype.ONE_MINUS_SRC_COLOR;656/** @type {number} */657WebGLRenderingContext.prototype.SRC_ALPHA;658/** @type {number} */659WebGLRenderingContext.prototype.ONE_MINUS_SRC_ALPHA;660/** @type {number} */661WebGLRenderingContext.prototype.DST_ALPHA;662/** @type {number} */663WebGLRenderingContext.prototype.ONE_MINUS_DST_ALPHA;664/** @type {number} */665WebGLRenderingContext.prototype.DST_COLOR;666/** @type {number} */667WebGLRenderingContext.prototype.ONE_MINUS_DST_COLOR;668/** @type {number} */669WebGLRenderingContext.prototype.SRC_ALPHA_SATURATE;670/** @type {number} */671WebGLRenderingContext.prototype.FUNC_ADD;672/** @type {number} */673WebGLRenderingContext.prototype.BLEND_EQUATION;674/** @type {number} */675WebGLRenderingContext.prototype.BLEND_EQUATION_RGB;676/** @type {number} */677WebGLRenderingContext.prototype.BLEND_EQUATION_ALPHA;678/** @type {number} */679WebGLRenderingContext.prototype.FUNC_SUBTRACT;680/** @type {number} */681WebGLRenderingContext.prototype.FUNC_REVERSE_SUBTRACT;682/** @type {number} */683WebGLRenderingContext.prototype.BLEND_DST_RGB;684/** @type {number} */685WebGLRenderingContext.prototype.BLEND_SRC_RGB;686/** @type {number} */687WebGLRenderingContext.prototype.BLEND_DST_ALPHA;688/** @type {number} */689WebGLRenderingContext.prototype.BLEND_SRC_ALPHA;690/** @type {number} */691WebGLRenderingContext.prototype.CONSTANT_COLOR;692/** @type {number} */693WebGLRenderingContext.prototype.ONE_MINUS_CONSTANT_COLOR;694/** @type {number} */695WebGLRenderingContext.prototype.CONSTANT_ALPHA;696/** @type {number} */697WebGLRenderingContext.prototype.ONE_MINUS_CONSTANT_ALPHA;698/** @type {number} */699WebGLRenderingContext.prototype.BLEND_COLOR;700/** @type {number} */701WebGLRenderingContext.prototype.ARRAY_BUFFER;702/** @type {number} */703WebGLRenderingContext.prototype.ELEMENT_ARRAY_BUFFER;704/** @type {number} */705WebGLRenderingContext.prototype.ARRAY_BUFFER_BINDING;706/** @type {number} */707WebGLRenderingContext.prototype.ELEMENT_ARRAY_BUFFER_BINDING;708/** @type {number} */709WebGLRenderingContext.prototype.STREAM_DRAW;710/** @type {number} */711WebGLRenderingContext.prototype.STATIC_DRAW;712/** @type {number} */713WebGLRenderingContext.prototype.DYNAMIC_DRAW;714/** @type {number} */715WebGLRenderingContext.prototype.BUFFER_SIZE;716/** @type {number} */717WebGLRenderingContext.prototype.BUFFER_USAGE;718/** @type {number} */719WebGLRenderingContext.prototype.CURRENT_VERTEX_ATTRIB;720/** @type {number} */721WebGLRenderingContext.prototype.FRONT;722/** @type {number} */723WebGLRenderingContext.prototype.BACK;724/** @type {number} */725WebGLRenderingContext.prototype.FRONT_AND_BACK;726/** @type {number} */727WebGLRenderingContext.prototype.CULL_FACE;728/** @type {number} */729WebGLRenderingContext.prototype.BLEND;730/** @type {number} */731WebGLRenderingContext.prototype.DITHER;732/** @type {number} */733WebGLRenderingContext.prototype.STENCIL_TEST;734/** @type {number} */735WebGLRenderingContext.prototype.DEPTH_TEST;736/** @type {number} */737WebGLRenderingContext.prototype.SCISSOR_TEST;738/** @type {number} */739WebGLRenderingContext.prototype.POLYGON_OFFSET_FILL;740/** @type {number} */741WebGLRenderingContext.prototype.SAMPLE_ALPHA_TO_COVERAGE;742/** @type {number} */743WebGLRenderingContext.prototype.SAMPLE_COVERAGE;744/** @type {number} */745WebGLRenderingContext.prototype.NO_ERROR;746/** @type {number} */747WebGLRenderingContext.prototype.INVALID_ENUM;748/** @type {number} */749WebGLRenderingContext.prototype.INVALID_VALUE;750/** @type {number} */751WebGLRenderingContext.prototype.INVALID_OPERATION;752/** @type {number} */753WebGLRenderingContext.prototype.OUT_OF_MEMORY;754/** @type {number} */755WebGLRenderingContext.prototype.CW;756/** @type {number} */757WebGLRenderingContext.prototype.CCW;758/** @type {number} */759WebGLRenderingContext.prototype.LINE_WIDTH;760/** @type {number} */761WebGLRenderingContext.prototype.ALIASED_POINT_SIZE_RANGE;762/** @type {number} */763WebGLRenderingContext.prototype.ALIASED_LINE_WIDTH_RANGE;764/** @type {number} */765WebGLRenderingContext.prototype.CULL_FACE_MODE;766/** @type {number} */767WebGLRenderingContext.prototype.FRONT_FACE;768/** @type {number} */769WebGLRenderingContext.prototype.DEPTH_RANGE;770/** @type {number} */771WebGLRenderingContext.prototype.DEPTH_WRITEMASK;772/** @type {number} */773WebGLRenderingContext.prototype.DEPTH_CLEAR_VALUE;774/** @type {number} */775WebGLRenderingContext.prototype.DEPTH_FUNC;776/** @type {number} */777WebGLRenderingContext.prototype.STENCIL_CLEAR_VALUE;778/** @type {number} */779WebGLRenderingContext.prototype.STENCIL_FUNC;780/** @type {number} */781WebGLRenderingContext.prototype.STENCIL_FAIL;782/** @type {number} */783WebGLRenderingContext.prototype.STENCIL_PASS_DEPTH_FAIL;784/** @type {number} */785WebGLRenderingContext.prototype.STENCIL_PASS_DEPTH_PASS;786/** @type {number} */787WebGLRenderingContext.prototype.STENCIL_REF;788/** @type {number} */789WebGLRenderingContext.prototype.STENCIL_VALUE_MASK;790/** @type {number} */791WebGLRenderingContext.prototype.STENCIL_WRITEMASK;792/** @type {number} */793WebGLRenderingContext.prototype.STENCIL_BACK_FUNC;794/** @type {number} */795WebGLRenderingContext.prototype.STENCIL_BACK_FAIL;796/** @type {number} */797WebGLRenderingContext.prototype.STENCIL_BACK_PASS_DEPTH_FAIL;798/** @type {number} */799WebGLRenderingContext.prototype.STENCIL_BACK_PASS_DEPTH_PASS;800/** @type {number} */801WebGLRenderingContext.prototype.STENCIL_BACK_REF;802/** @type {number} */803WebGLRenderingContext.prototype.STENCIL_BACK_VALUE_MASK;804/** @type {number} */805WebGLRenderingContext.prototype.STENCIL_BACK_WRITEMASK;806/** @type {number} */807WebGLRenderingContext.prototype.VIEWPORT;808/** @type {number} */809WebGLRenderingContext.prototype.SCISSOR_BOX;810/** @type {number} */811WebGLRenderingContext.prototype.COLOR_CLEAR_VALUE;812/** @type {number} */813WebGLRenderingContext.prototype.COLOR_WRITEMASK;814/** @type {number} */815WebGLRenderingContext.prototype.UNPACK_ALIGNMENT;816/** @type {number} */817WebGLRenderingContext.prototype.PACK_ALIGNMENT;818/** @type {number} */819WebGLRenderingContext.prototype.MAX_TEXTURE_SIZE;820/** @type {number} */821WebGLRenderingContext.prototype.MAX_VIEWPORT_DIMS;822/** @type {number} */823WebGLRenderingContext.prototype.SUBPIXEL_BITS;824/** @type {number} */825WebGLRenderingContext.prototype.RED_BITS;826/** @type {number} */827WebGLRenderingContext.prototype.GREEN_BITS;828/** @type {number} */829WebGLRenderingContext.prototype.BLUE_BITS;830/** @type {number} */831WebGLRenderingContext.prototype.ALPHA_BITS;832/** @type {number} */833WebGLRenderingContext.prototype.DEPTH_BITS;834/** @type {number} */835WebGLRenderingContext.prototype.STENCIL_BITS;836/** @type {number} */837WebGLRenderingContext.prototype.POLYGON_OFFSET_UNITS;838/** @type {number} */839WebGLRenderingContext.prototype.POLYGON_OFFSET_FACTOR;840/** @type {number} */841WebGLRenderingContext.prototype.TEXTURE_BINDING_2D;842/** @type {number} */843WebGLRenderingContext.prototype.SAMPLE_BUFFERS;844/** @type {number} */845WebGLRenderingContext.prototype.SAMPLES;846/** @type {number} */847WebGLRenderingContext.prototype.SAMPLE_COVERAGE_VALUE;848/** @type {number} */849WebGLRenderingContext.prototype.SAMPLE_COVERAGE_INVERT;850/** @type {number} */851WebGLRenderingContext.prototype.COMPRESSED_TEXTURE_FORMATS;852/** @type {number} */853WebGLRenderingContext.prototype.DONT_CARE;854/** @type {number} */855WebGLRenderingContext.prototype.FASTEST;856/** @type {number} */857WebGLRenderingContext.prototype.NICEST;858/** @type {number} */859WebGLRenderingContext.prototype.GENERATE_MIPMAP_HINT;860/** @type {number} */861WebGLRenderingContext.prototype.BYTE;862/** @type {number} */863WebGLRenderingContext.prototype.UNSIGNED_BYTE;864/** @type {number} */865WebGLRenderingContext.prototype.SHORT;866/** @type {number} */867WebGLRenderingContext.prototype.UNSIGNED_SHORT;868/** @type {number} */869WebGLRenderingContext.prototype.INT;870/** @type {number} */871WebGLRenderingContext.prototype.UNSIGNED_INT;872/** @type {number} */873WebGLRenderingContext.prototype.FLOAT;874/** @type {number} */875WebGLRenderingContext.prototype.DEPTH_COMPONENT;876/** @type {number} */877WebGLRenderingContext.prototype.ALPHA;878/** @type {number} */879WebGLRenderingContext.prototype.RGB;880/** @type {number} */881WebGLRenderingContext.prototype.RGBA;882/** @type {number} */883WebGLRenderingContext.prototype.LUMINANCE;884/** @type {number} */885WebGLRenderingContext.prototype.LUMINANCE_ALPHA;886/** @type {number} */887WebGLRenderingContext.prototype.UNSIGNED_SHORT_4_4_4_4;888/** @type {number} */889WebGLRenderingContext.prototype.UNSIGNED_SHORT_5_5_5_1;890/** @type {number} */891WebGLRenderingContext.prototype.UNSIGNED_SHORT_5_6_5;892/** @type {number} */893WebGLRenderingContext.prototype.FRAGMENT_SHADER;894/** @type {number} */895WebGLRenderingContext.prototype.VERTEX_SHADER;896/** @type {number} */897WebGLRenderingContext.prototype.MAX_VERTEX_ATTRIBS;898/** @type {number} */899WebGLRenderingContext.prototype.MAX_VERTEX_UNIFORM_VECTORS;900/** @type {number} */901WebGLRenderingContext.prototype.MAX_VARYING_VECTORS;902/** @type {number} */903WebGLRenderingContext.prototype.MAX_COMBINED_TEXTURE_IMAGE_UNITS;904/** @type {number} */905WebGLRenderingContext.prototype.MAX_VERTEX_TEXTURE_IMAGE_UNITS;906/** @type {number} */907WebGLRenderingContext.prototype.MAX_TEXTURE_IMAGE_UNITS;908/** @type {number} */909WebGLRenderingContext.prototype.MAX_FRAGMENT_UNIFORM_VECTORS;910/** @type {number} */911WebGLRenderingContext.prototype.SHADER_TYPE;912/** @type {number} */913WebGLRenderingContext.prototype.DELETE_STATUS;914/** @type {number} */915WebGLRenderingContext.prototype.LINK_STATUS;916/** @type {number} */917WebGLRenderingContext.prototype.VALIDATE_STATUS;918/** @type {number} */919WebGLRenderingContext.prototype.ATTACHED_SHADERS;920/** @type {number} */921WebGLRenderingContext.prototype.ACTIVE_UNIFORMS;922/** @type {number} */923WebGLRenderingContext.prototype.ACTIVE_ATTRIBUTES;924/** @type {number} */925WebGLRenderingContext.prototype.SHADING_LANGUAGE_VERSION;926/** @type {number} */927WebGLRenderingContext.prototype.CURRENT_PROGRAM;928/** @type {number} */929WebGLRenderingContext.prototype.NEVER;930/** @type {number} */931WebGLRenderingContext.prototype.LESS;932/** @type {number} */933WebGLRenderingContext.prototype.EQUAL;934/** @type {number} */935WebGLRenderingContext.prototype.LEQUAL;936/** @type {number} */937WebGLRenderingContext.prototype.GREATER;938/** @type {number} */939WebGLRenderingContext.prototype.NOTEQUAL;940/** @type {number} */941WebGLRenderingContext.prototype.GEQUAL;942/** @type {number} */943WebGLRenderingContext.prototype.ALWAYS;944/** @type {number} */945WebGLRenderingContext.prototype.KEEP;946/** @type {number} */947WebGLRenderingContext.prototype.REPLACE;948/** @type {number} */949WebGLRenderingContext.prototype.INCR;950/** @type {number} */951WebGLRenderingContext.prototype.DECR;952/** @type {number} */953WebGLRenderingContext.prototype.INVERT;954/** @type {number} */955WebGLRenderingContext.prototype.INCR_WRAP;956/** @type {number} */957WebGLRenderingContext.prototype.DECR_WRAP;958/** @type {number} */959WebGLRenderingContext.prototype.VENDOR;960/** @type {number} */961WebGLRenderingContext.prototype.RENDERER;962/** @type {number} */963WebGLRenderingContext.prototype.VERSION;964/** @type {number} */965WebGLRenderingContext.prototype.NEAREST;966/** @type {number} */967WebGLRenderingContext.prototype.LINEAR;968/** @type {number} */969WebGLRenderingContext.prototype.NEAREST_MIPMAP_NEAREST;970/** @type {number} */971WebGLRenderingContext.prototype.LINEAR_MIPMAP_NEAREST;972/** @type {number} */973WebGLRenderingContext.prototype.NEAREST_MIPMAP_LINEAR;974/** @type {number} */975WebGLRenderingContext.prototype.LINEAR_MIPMAP_LINEAR;976/** @type {number} */977WebGLRenderingContext.prototype.TEXTURE_MAG_FILTER;978/** @type {number} */979WebGLRenderingContext.prototype.TEXTURE_MIN_FILTER;980/** @type {number} */981WebGLRenderingContext.prototype.TEXTURE_WRAP_S;982/** @type {number} */983WebGLRenderingContext.prototype.TEXTURE_WRAP_T;984/** @type {number} */985WebGLRenderingContext.prototype.TEXTURE_2D;986/** @type {number} */987WebGLRenderingContext.prototype.TEXTURE;988/** @type {number} */989WebGLRenderingContext.prototype.TEXTURE_CUBE_MAP;990/** @type {number} */991WebGLRenderingContext.prototype.TEXTURE_BINDING_CUBE_MAP;992/** @type {number} */993WebGLRenderingContext.prototype.TEXTURE_CUBE_MAP_POSITIVE_X;994/** @type {number} */995WebGLRenderingContext.prototype.TEXTURE_CUBE_MAP_NEGATIVE_X;996/** @type {number} */997WebGLRenderingContext.prototype.TEXTURE_CUBE_MAP_POSITIVE_Y;998/** @type {number} */999WebGLRenderingContext.prototype.TEXTURE_CUBE_MAP_NEGATIVE_Y;1000/** @type {number} */1001WebGLRenderingContext.prototype.TEXTURE_CUBE_MAP_POSITIVE_Z;1002/** @type {number} */1003WebGLRenderingContext.prototype.TEXTURE_CUBE_MAP_NEGATIVE_Z;1004/** @type {number} */1005WebGLRenderingContext.prototype.MAX_CUBE_MAP_TEXTURE_SIZE;1006/** @type {number} */1007WebGLRenderingContext.prototype.TEXTURE0;1008/** @type {number} */1009WebGLRenderingContext.prototype.TEXTURE1;1010/** @type {number} */1011WebGLRenderingContext.prototype.TEXTURE2;1012/** @type {number} */1013WebGLRenderingContext.prototype.TEXTURE3;1014/** @type {number} */1015WebGLRenderingContext.prototype.TEXTURE4;1016/** @type {number} */1017WebGLRenderingContext.prototype.TEXTURE5;1018/** @type {number} */1019WebGLRenderingContext.prototype.TEXTURE6;1020/** @type {number} */1021WebGLRenderingContext.prototype.TEXTURE7;1022/** @type {number} */1023WebGLRenderingContext.prototype.TEXTURE8;1024/** @type {number} */1025WebGLRenderingContext.prototype.TEXTURE9;1026/** @type {number} */1027WebGLRenderingContext.prototype.TEXTURE10;1028/** @type {number} */1029WebGLRenderingContext.prototype.TEXTURE11;1030/** @type {number} */1031WebGLRenderingContext.prototype.TEXTURE12;1032/** @type {number} */1033WebGLRenderingContext.prototype.TEXTURE13;1034/** @type {number} */1035WebGLRenderingContext.prototype.TEXTURE14;1036/** @type {number} */1037WebGLRenderingContext.prototype.TEXTURE15;1038/** @type {number} */1039WebGLRenderingContext.prototype.TEXTURE16;1040/** @type {number} */1041WebGLRenderingContext.prototype.TEXTURE17;1042/** @type {number} */1043WebGLRenderingContext.prototype.TEXTURE18;1044/** @type {number} */1045WebGLRenderingContext.prototype.TEXTURE19;1046/** @type {number} */1047WebGLRenderingContext.prototype.TEXTURE20;1048/** @type {number} */1049WebGLRenderingContext.prototype.TEXTURE21;1050/** @type {number} */1051WebGLRenderingContext.prototype.TEXTURE22;1052/** @type {number} */1053WebGLRenderingContext.prototype.TEXTURE23;1054/** @type {number} */1055WebGLRenderingContext.prototype.TEXTURE24;1056/** @type {number} */1057WebGLRenderingContext.prototype.TEXTURE25;1058/** @type {number} */1059WebGLRenderingContext.prototype.TEXTURE26;1060/** @type {number} */1061WebGLRenderingContext.prototype.TEXTURE27;1062/** @type {number} */1063WebGLRenderingContext.prototype.TEXTURE28;1064/** @type {number} */1065WebGLRenderingContext.prototype.TEXTURE29;1066/** @type {number} */1067WebGLRenderingContext.prototype.TEXTURE30;1068/** @type {number} */1069WebGLRenderingContext.prototype.TEXTURE31;1070/** @type {number} */1071WebGLRenderingContext.prototype.ACTIVE_TEXTURE;1072/** @type {number} */1073WebGLRenderingContext.prototype.REPEAT;1074/** @type {number} */1075WebGLRenderingContext.prototype.CLAMP_TO_EDGE;1076/** @type {number} */1077WebGLRenderingContext.prototype.MIRRORED_REPEAT;1078/** @type {number} */1079WebGLRenderingContext.prototype.FLOAT_VEC2;1080/** @type {number} */1081WebGLRenderingContext.prototype.FLOAT_VEC3;1082/** @type {number} */1083WebGLRenderingContext.prototype.FLOAT_VEC4;1084/** @type {number} */1085WebGLRenderingContext.prototype.INT_VEC2;1086/** @type {number} */1087WebGLRenderingContext.prototype.INT_VEC3;1088/** @type {number} */1089WebGLRenderingContext.prototype.INT_VEC4;1090/** @type {number} */1091WebGLRenderingContext.prototype.BOOL;1092/** @type {number} */1093WebGLRenderingContext.prototype.BOOL_VEC2;1094/** @type {number} */1095WebGLRenderingContext.prototype.BOOL_VEC3;1096/** @type {number} */1097WebGLRenderingContext.prototype.BOOL_VEC4;1098/** @type {number} */1099WebGLRenderingContext.prototype.FLOAT_MAT2;1100/** @type {number} */1101WebGLRenderingContext.prototype.FLOAT_MAT3;1102/** @type {number} */1103WebGLRenderingContext.prototype.FLOAT_MAT4;1104/** @type {number} */1105WebGLRenderingContext.prototype.SAMPLER_2D;1106/** @type {number} */1107WebGLRenderingContext.prototype.SAMPLER_CUBE;1108/** @type {number} */1109WebGLRenderingContext.prototype.VERTEX_ATTRIB_ARRAY_ENABLED;1110/** @type {number} */1111WebGLRenderingContext.prototype.VERTEX_ATTRIB_ARRAY_SIZE;1112/** @type {number} */1113WebGLRenderingContext.prototype.VERTEX_ATTRIB_ARRAY_STRIDE;1114/** @type {number} */1115WebGLRenderingContext.prototype.VERTEX_ATTRIB_ARRAY_TYPE;1116/** @type {number} */1117WebGLRenderingContext.prototype.VERTEX_ATTRIB_ARRAY_NORMALIZED;1118/** @type {number} */1119WebGLRenderingContext.prototype.VERTEX_ATTRIB_ARRAY_POINTER;1120/** @type {number} */1121WebGLRenderingContext.prototype.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING;1122/** @type {number} */1123WebGLRenderingContext.prototype.COMPILE_STATUS;1124/** @type {number} */1125WebGLRenderingContext.prototype.LOW_FLOAT;1126/** @type {number} */1127WebGLRenderingContext.prototype.MEDIUM_FLOAT;1128/** @type {number} */1129WebGLRenderingContext.prototype.HIGH_FLOAT;1130/** @type {number} */1131WebGLRenderingContext.prototype.LOW_INT;1132/** @type {number} */1133WebGLRenderingContext.prototype.MEDIUM_INT;1134/** @type {number} */1135WebGLRenderingContext.prototype.HIGH_INT;1136/** @type {number} */1137WebGLRenderingContext.prototype.FRAMEBUFFER;1138/** @type {number} */1139WebGLRenderingContext.prototype.RENDERBUFFER;1140/** @type {number} */1141WebGLRenderingContext.prototype.RGBA4;1142/** @type {number} */1143WebGLRenderingContext.prototype.RGB5_A1;1144/** @type {number} */1145WebGLRenderingContext.prototype.RGB565;1146/** @type {number} */1147WebGLRenderingContext.prototype.DEPTH_COMPONENT16;1148/** @type {number} */1149WebGLRenderingContext.prototype.STENCIL_INDEX;1150/** @type {number} */1151WebGLRenderingContext.prototype.STENCIL_INDEX8;1152/** @type {number} */1153WebGLRenderingContext.prototype.DEPTH_STENCIL;1154/** @type {number} */1155WebGLRenderingContext.prototype.RENDERBUFFER_WIDTH;1156/** @type {number} */1157WebGLRenderingContext.prototype.RENDERBUFFER_HEIGHT;1158/** @type {number} */1159WebGLRenderingContext.prototype.RENDERBUFFER_INTERNAL_FORMAT;1160/** @type {number} */1161WebGLRenderingContext.prototype.RENDERBUFFER_RED_SIZE;1162/** @type {number} */1163WebGLRenderingContext.prototype.RENDERBUFFER_GREEN_SIZE;1164/** @type {number} */1165WebGLRenderingContext.prototype.RENDERBUFFER_BLUE_SIZE;1166/** @type {number} */1167WebGLRenderingContext.prototype.RENDERBUFFER_ALPHA_SIZE;1168/** @type {number} */1169WebGLRenderingContext.prototype.RENDERBUFFER_DEPTH_SIZE;1170/** @type {number} */1171WebGLRenderingContext.prototype.RENDERBUFFER_STENCIL_SIZE;1172/** @type {number} */1173WebGLRenderingContext.prototype.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE;1174/** @type {number} */1175WebGLRenderingContext.prototype.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME;1176/** @type {number} */1177WebGLRenderingContext.prototype.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL;1178/** @type {number} */1179WebGLRenderingContext.prototype.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE;1180/** @type {number} */1181WebGLRenderingContext.prototype.COLOR_ATTACHMENT0;1182/** @type {number} */1183WebGLRenderingContext.prototype.DEPTH_ATTACHMENT;1184/** @type {number} */1185WebGLRenderingContext.prototype.STENCIL_ATTACHMENT;1186/** @type {number} */1187WebGLRenderingContext.prototype.DEPTH_STENCIL_ATTACHMENT;1188/** @type {number} */1189WebGLRenderingContext.prototype.NONE;1190/** @type {number} */1191WebGLRenderingContext.prototype.FRAMEBUFFER_COMPLETE;1192/** @type {number} */1193WebGLRenderingContext.prototype.FRAMEBUFFER_INCOMPLETE_ATTACHMENT;1194/** @type {number} */1195WebGLRenderingContext.prototype.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT;1196/** @type {number} */1197WebGLRenderingContext.prototype.FRAMEBUFFER_INCOMPLETE_DIMENSIONS;1198/** @type {number} */1199WebGLRenderingContext.prototype.FRAMEBUFFER_UNSUPPORTED;1200/** @type {number} */1201WebGLRenderingContext.prototype.FRAMEBUFFER_BINDING;1202/** @type {number} */1203WebGLRenderingContext.prototype.RENDERBUFFER_BINDING;1204/** @type {number} */1205WebGLRenderingContext.prototype.MAX_RENDERBUFFER_SIZE;1206/** @type {number} */1207WebGLRenderingContext.prototype.INVALID_FRAMEBUFFER_OPERATION;1208/** @type {number} */1209WebGLRenderingContext.prototype.UNPACK_FLIP_Y_WEBGL;1210/** @type {number} */1211WebGLRenderingContext.prototype.UNPACK_PREMULTIPLY_ALPHA_WEBGL;1212/** @type {number} */1213WebGLRenderingContext.prototype.CONTEXT_LOST_WEBGL;1214/** @type {number} */1215WebGLRenderingContext.prototype.UNPACK_COLORSPACE_CONVERSION_WEBGL;1216/** @type {number} */1217WebGLRenderingContext.prototype.BROWSER_DEFAULT_WEBGL;1218/**1219 * @type {!HTMLCanvasElement}1220 */1221WebGLRenderingContext.prototype.canvas;1222/**1223 * @type {number}1224 */1225WebGLRenderingContext.prototype.drawingBufferWidth;1226/**1227 * @type {number}1228 */1229WebGLRenderingContext.prototype.drawingBufferHeight;1230/**1231 * @return {!WebGLContextAttributes}1232 * @nosideeffects1233 */1234WebGLRenderingContext.prototype.getContextAttributes = function() {};1235/**1236 * @return {boolean}1237 * @nosideeffects1238 */1239WebGLRenderingContext.prototype.isContextLost = function() {};1240/**1241 * @return {!Array<string>}1242 * @nosideeffects1243 */1244WebGLRenderingContext.prototype.getSupportedExtensions = function() {};1245/**1246 * Note that this has side effects by enabling the extension even if the1247 * result is not used.1248 * @param {string} name1249 * @return {Object}1250 */1251WebGLRenderingContext.prototype.getExtension = function(name) {};1252/**1253 * @param {number} texture1254 * @return {undefined}1255 */1256WebGLRenderingContext.prototype.activeTexture = function(texture) {};1257/**1258 * @param {WebGLProgram} program1259 * @param {WebGLShader} shader1260 * @return {undefined}1261 */1262WebGLRenderingContext.prototype.attachShader = function(program, shader) {};1263/**1264 * @param {WebGLProgram} program1265 * @param {number} index1266 * @param {string} name1267 * @return {undefined}1268 */1269WebGLRenderingContext.prototype.bindAttribLocation = function(1270 program, index, name) {};1271/**1272 * @param {number} target1273 * @param {WebGLBuffer} buffer1274 * @return {undefined}1275 */1276WebGLRenderingContext.prototype.bindBuffer = function(target, buffer) {};1277/**1278 * @param {number} target1279 * @param {WebGLFramebuffer} buffer1280 * @return {undefined}1281 */1282WebGLRenderingContext.prototype.bindFramebuffer = function(target, buffer) {};1283/**1284 * @param {number} target1285 * @param {WebGLRenderbuffer} buffer1286 * @return {undefined}1287 */1288WebGLRenderingContext.prototype.bindRenderbuffer = function(target, buffer) {};1289/**1290 * @param {number} target1291 * @param {WebGLTexture} texture1292 * @return {undefined}1293 */1294WebGLRenderingContext.prototype.bindTexture = function(target, texture) {};1295/**1296 * @param {number} red1297 * @param {number} green1298 * @param {number} blue1299 * @param {number} alpha1300 * @return {undefined}1301 */1302WebGLRenderingContext.prototype.blendColor = function(1303 red, green, blue, alpha) {};1304/**1305 * @param {number} mode1306 * @return {undefined}1307 */1308WebGLRenderingContext.prototype.blendEquation = function(mode) {};1309/**1310 * @param {number} modeRGB1311 * @param {number} modeAlpha1312 * @return {undefined}1313 */1314WebGLRenderingContext.prototype.blendEquationSeparate = function(1315 modeRGB, modeAlpha) {};1316/**1317 * @param {number} sfactor1318 * @param {number} dfactor1319 * @return {undefined}1320 */1321WebGLRenderingContext.prototype.blendFunc = function(sfactor, dfactor) {};1322/**1323 * @param {number} srcRGB1324 * @param {number} dstRGB1325 * @param {number} srcAlpha1326 * @param {number} dstAlpha1327 * @return {undefined}1328 */1329WebGLRenderingContext.prototype.blendFuncSeparate = function(1330 srcRGB, dstRGB, srcAlpha, dstAlpha) {};1331/**1332 * @param {number} target1333 * @param {ArrayBufferView|ArrayBuffer|number} data1334 * @param {number} usage1335 * @return {undefined}1336 */1337WebGLRenderingContext.prototype.bufferData = function(target, data, usage) {};1338/**1339 * @param {number} target1340 * @param {number} offset1341 * @param {ArrayBufferView|ArrayBuffer} data1342 * @return {undefined}1343 */1344WebGLRenderingContext.prototype.bufferSubData = function(1345 target, offset, data) {};1346/**1347 * @param {number} target1348 * @return {number}1349 */1350WebGLRenderingContext.prototype.checkFramebufferStatus = function(target) {};1351/**1352 * @param {number} mask1353 * @return {undefined}1354 */1355WebGLRenderingContext.prototype.clear = function(mask) {};1356/**1357 * @param {number} red1358 * @param {number} green1359 * @param {number} blue1360 * @param {number} alpha1361 * @return {undefined}1362 */1363WebGLRenderingContext.prototype.clearColor = function(1364 red, green, blue, alpha) {};1365/**1366 * @param {number} depth1367 * @return {undefined}1368 */1369WebGLRenderingContext.prototype.clearDepth = function(depth) {};1370/**1371 * @param {number} s1372 * @return {undefined}1373 */1374WebGLRenderingContext.prototype.clearStencil = function(s) {};1375/**1376 * @param {boolean} red1377 * @param {boolean} green1378 * @param {boolean} blue1379 * @param {boolean} alpha1380 * @return {undefined}1381 */1382WebGLRenderingContext.prototype.colorMask = function(1383 red, green, blue, alpha) {};1384/**1385 * @param {WebGLShader} shader1386 * @return {undefined}1387 */1388WebGLRenderingContext.prototype.compileShader = function(shader) {};1389/**1390 * @param {number} target1391 * @param {number} level1392 * @param {number} internalformat1393 * @param {number} width1394 * @param {number} height1395 * @param {number} border1396 * @param {ArrayBufferView} data1397 * @return {undefined}1398 */1399WebGLRenderingContext.prototype.compressedTexImage2D = function(1400 target, level, internalformat, width, height, border, data) {};1401/**1402 * @param {number} target1403 * @param {number} level1404 * @param {number} xoffset1405 * @param {number} yoffset1406 * @param {number} width1407 * @param {number} height1408 * @param {number} format1409 * @param {ArrayBufferView} data1410 * @return {undefined}1411 */1412WebGLRenderingContext.prototype.compressedTexSubImage2D = function(1413 target, level, xoffset, yoffset, width, height, format, data) {};1414/**1415 * @param {number} target1416 * @param {number} level1417 * @param {number} format1418 * @param {number} x1419 * @param {number} y1420 * @param {number} width1421 * @param {number} height1422 * @param {number} border1423 * @return {undefined}1424 */1425WebGLRenderingContext.prototype.copyTexImage2D = function(1426 target, level, format, x, y, width, height, border) {};1427/**1428 * @param {number} target1429 * @param {number} level1430 * @param {number} xoffset1431 * @param {number} yoffset1432 * @param {number} x1433 * @param {number} y1434 * @param {number} width1435 * @param {number} height1436 * @return {undefined}1437 */1438WebGLRenderingContext.prototype.copyTexSubImage2D = function(1439 target, level, xoffset, yoffset, x, y, width, height) {};1440/**1441 * @return {!WebGLBuffer}1442 * @nosideeffects1443 */1444WebGLRenderingContext.prototype.createBuffer = function() {};1445/**1446 * @return {!WebGLFramebuffer}1447 * @nosideeffects1448 */1449WebGLRenderingContext.prototype.createFramebuffer = function() {};1450/**1451 * @return {!WebGLProgram}1452 * @nosideeffects1453 */1454WebGLRenderingContext.prototype.createProgram = function() {};1455/**1456 * @return {!WebGLRenderbuffer}1457 * @nosideeffects1458 */1459WebGLRenderingContext.prototype.createRenderbuffer = function() {};1460/**1461 * @param {number} type1462 * @return {!WebGLShader}1463 * @nosideeffects1464 */1465WebGLRenderingContext.prototype.createShader = function(type) {};1466/**1467 * @return {!WebGLTexture}1468 * @nosideeffects1469 */1470WebGLRenderingContext.prototype.createTexture = function() {};1471/**1472 * @param {number} mode1473 * @return {undefined}1474 */1475WebGLRenderingContext.prototype.cullFace = function(mode) {};1476/**1477 * @param {WebGLBuffer} buffer1478 * @return {undefined}1479 */1480WebGLRenderingContext.prototype.deleteBuffer = function(buffer) {};1481/**1482 * @param {WebGLFramebuffer} buffer1483 * @return {undefined}1484 */1485WebGLRenderingContext.prototype.deleteFramebuffer = function(buffer) {};1486/**1487 * @param {WebGLProgram} program1488 * @return {undefined}1489 */1490WebGLRenderingContext.prototype.deleteProgram = function(program) {};1491/**1492 * @param {WebGLRenderbuffer} buffer1493 * @return {undefined}1494 */1495WebGLRenderingContext.prototype.deleteRenderbuffer = function(buffer) {};1496/**1497 * @param {WebGLShader} shader1498 * @return {undefined}1499 */1500WebGLRenderingContext.prototype.deleteShader = function(shader) {};1501/**1502 * @param {WebGLTexture} texture1503 * @return {undefined}1504 */1505WebGLRenderingContext.prototype.deleteTexture = function(texture) {};1506/**1507 * @param {number} func1508 * @return {undefined}1509 */1510WebGLRenderingContext.prototype.depthFunc = function(func) {};1511/**1512 * @param {boolean} flag1513 * @return {undefined}1514 */1515WebGLRenderingContext.prototype.depthMask = function(flag) {};1516/**1517 * @param {number} nearVal1518 * @param {number} farVal1519 * @return {undefined}1520 */1521WebGLRenderingContext.prototype.depthRange = function(nearVal, farVal) {};1522/**1523 * @param {WebGLProgram} program1524 * @param {WebGLShader} shader1525 * @return {undefined}1526 */1527WebGLRenderingContext.prototype.detachShader = function(program, shader) {};1528/**1529 * @param {number} flags1530 * @return {undefined}1531 */1532WebGLRenderingContext.prototype.disable = function(flags) {};1533/**1534 * @param {number} index1535 * @return {undefined}1536 */1537WebGLRenderingContext.prototype.disableVertexAttribArray = function(1538 index) {};1539/**1540 * @param {number} mode1541 * @param {number} first1542 * @param {number} count1543 * @return {undefined}1544 */1545WebGLRenderingContext.prototype.drawArrays = function(mode, first, count) {};1546/**1547 * @param {number} mode1548 * @param {number} count1549 * @param {number} type1550 * @param {number} offset1551 * @return {undefined}1552 */1553WebGLRenderingContext.prototype.drawElements = function(1554 mode, count, type, offset) {};1555/**1556 * @param {number} cap1557 * @return {undefined}1558 */1559WebGLRenderingContext.prototype.enable = function(cap) {};1560/**1561 * @param {number} index1562 * @return {undefined}1563 */1564WebGLRenderingContext.prototype.enableVertexAttribArray = function(1565 index) {};1566WebGLRenderingContext.prototype.finish = function() {};1567WebGLRenderingContext.prototype.flush = function() {};1568/**1569 * @param {number} target1570 * @param {number} attachment1571 * @param {number} renderbuffertarget1572 * @param {WebGLRenderbuffer} renderbuffer1573 * @return {undefined}1574 */1575WebGLRenderingContext.prototype.framebufferRenderbuffer = function(1576 target, attachment, renderbuffertarget, renderbuffer) {};1577/**1578 * @param {number} target1579 * @param {number} attachment1580 * @param {number} textarget1581 * @param {WebGLTexture} texture1582 * @param {number} level1583 * @return {undefined}1584 */1585WebGLRenderingContext.prototype.framebufferTexture2D = function(1586 target, attachment, textarget, texture, level) {};1587/**1588 * @param {number} mode1589 * @return {undefined}1590 */1591WebGLRenderingContext.prototype.frontFace = function(mode) {};1592/**1593 * @param {number} target1594 * @return {undefined}1595 */1596WebGLRenderingContext.prototype.generateMipmap = function(target) {};1597/**1598 * @param {WebGLProgram} program1599 * @param {number} index1600 * @return {WebGLActiveInfo}1601 * @nosideeffects1602 */1603WebGLRenderingContext.prototype.getActiveAttrib = function(program, index) {};1604/**1605 * @param {WebGLProgram} program1606 * @param {number} index1607 * @return {WebGLActiveInfo}1608 * @nosideeffects1609 */1610WebGLRenderingContext.prototype.getActiveUniform = function(program, index) {};1611/**1612 * @param {WebGLProgram} program1613 * @return {!Array<WebGLShader>}1614 * @nosideeffects1615 */1616WebGLRenderingContext.prototype.getAttachedShaders = function(program) {};1617/**1618 * @param {WebGLProgram} program1619 * @param {string} name1620 * @return {number}1621 * @nosideeffects1622 */1623WebGLRenderingContext.prototype.getAttribLocation = function(program, name) {};1624/**1625 * @param {number} target1626 * @param {number} pname1627 * @return {*}1628 * @nosideeffects1629 */1630WebGLRenderingContext.prototype.getBufferParameter = function(target, pname) {};1631/**1632 * @param {number} pname1633 * @return {*}1634 * @nosideeffects1635 */1636WebGLRenderingContext.prototype.getParameter = function(pname) {};1637/**1638 * @return {number}1639 * @nosideeffects1640 */1641WebGLRenderingContext.prototype.getError = function() {};1642/**1643 * @param {number} target1644 * @param {number} attachment1645 * @param {number} pname1646 * @return {*}1647 * @nosideeffects1648 */1649WebGLRenderingContext.prototype.getFramebufferAttachmentParameter = function(1650 target, attachment, pname) {};1651/**1652 * @param {WebGLProgram} program1653 * @param {number} pname1654 * @return {*}1655 * @nosideeffects1656 */1657WebGLRenderingContext.prototype.getProgramParameter = function(1658 program, pname) {};1659/**1660 * @param {WebGLProgram} program1661 * @return {string}1662 * @nosideeffects1663 */1664WebGLRenderingContext.prototype.getProgramInfoLog = function(program) {};1665/**1666 * @param {number} target1667 * @param {number} pname1668 * @return {*}1669 * @nosideeffects1670 */1671WebGLRenderingContext.prototype.getRenderbufferParameter = function(1672 target, pname) {};1673/**1674 * @param {WebGLShader} shader1675 * @param {number} pname1676 * @return {*}1677 * @nosideeffects1678 */1679WebGLRenderingContext.prototype.getShaderParameter = function(shader, pname) {};1680/**1681 * @param {number} shadertype1682 * @param {number} precisiontype1683 * @return {WebGLShaderPrecisionFormat}1684 * @nosideeffects1685 */1686WebGLRenderingContext.prototype.getShaderPrecisionFormat = function(shadertype,1687 precisiontype) {};1688/**1689 * @param {WebGLShader} shader1690 * @return {string}1691 * @nosideeffects1692 */1693WebGLRenderingContext.prototype.getShaderInfoLog = function(shader) {};1694/**1695 * @param {WebGLShader} shader1696 * @return {string}1697 * @nosideeffects1698 */1699WebGLRenderingContext.prototype.getShaderSource = function(shader) {};1700/**1701 * @param {number} target1702 * @param {number} pname1703 * @return {*}1704 * @nosideeffects1705 */1706WebGLRenderingContext.prototype.getTexParameter = function(target, pname) {};1707/**1708 * @param {WebGLProgram} program1709 * @param {WebGLUniformLocation} location1710 * @return {*}1711 * @nosideeffects1712 */1713WebGLRenderingContext.prototype.getUniform = function(program, location) {};1714/**1715 * @param {WebGLProgram} program1716 * @param {string} name1717 * @return {WebGLUniformLocation}1718 * @nosideeffects1719 */1720WebGLRenderingContext.prototype.getUniformLocation = function(program, name) {};1721/**1722 * @param {number} index1723 * @param {number} pname1724 * @return {*}1725 * @nosideeffects1726 */1727WebGLRenderingContext.prototype.getVertexAttrib = function(index, pname) {};1728/**1729 * @param {number} index1730 * @param {number} pname1731 * @return {number}1732 * @nosideeffects1733 */1734WebGLRenderingContext.prototype.getVertexAttribOffset = function(1735 index, pname) {};1736/**1737 * @param {number} target1738 * @param {number} mode1739 * @return {undefined}1740 */1741WebGLRenderingContext.prototype.hint = function(target, mode) {};1742/**1743 * @param {WebGLObject} buffer1744 * @return {boolean}1745 * @nosideeffects1746 */1747WebGLRenderingContext.prototype.isBuffer = function(buffer) {};1748/**1749 * @param {number} cap1750 * @return {boolean}1751 * @nosideeffects1752 */1753WebGLRenderingContext.prototype.isEnabled = function(cap) {};1754/**1755 * @param {WebGLObject} framebuffer1756 * @return {boolean}1757 * @nosideeffects1758 */1759WebGLRenderingContext.prototype.isFramebuffer = function(framebuffer) {};1760/**1761 * @param {WebGLObject} program1762 * @return {boolean}1763 * @nosideeffects1764 */1765WebGLRenderingContext.prototype.isProgram = function(program) {};1766/**1767 * @param {WebGLObject} renderbuffer1768 * @return {boolean}1769 * @nosideeffects1770 */1771WebGLRenderingContext.prototype.isRenderbuffer = function(renderbuffer) {};1772/**1773 * @param {WebGLObject} shader1774 * @return {boolean}1775 * @nosideeffects1776 */1777WebGLRenderingContext.prototype.isShader = function(shader) {};1778/**1779 * @param {WebGLObject} texture1780 * @return {boolean}1781 * @nosideeffects1782 */1783WebGLRenderingContext.prototype.isTexture = function(texture) {};1784/**1785 * @param {number} width1786 * @return {undefined}1787 */1788WebGLRenderingContext.prototype.lineWidth = function(width) {};1789/**1790 * @param {WebGLProgram} program1791 * @return {undefined}1792 */1793WebGLRenderingContext.prototype.linkProgram = function(program) {};1794/**1795 * @param {number} pname1796 * @param {number} param1797 * @return {undefined}1798 */1799WebGLRenderingContext.prototype.pixelStorei = function(pname, param) {};1800/**1801 * @param {number} factor1802 * @param {number} units1803 * @return {undefined}1804 */1805WebGLRenderingContext.prototype.polygonOffset = function(factor, units) {};1806/**1807 * @param {number} x1808 * @param {number} y1809 * @param {number} width1810 * @param {number} height1811 * @param {number} format1812 * @param {number} type1813 * @param {ArrayBufferView} pixels1814 * @return {undefined}1815 */1816WebGLRenderingContext.prototype.readPixels = function(1817 x, y, width, height, format, type, pixels) {};1818/**1819 * @param {number} target1820 * @param {number} internalformat1821 * @param {number} width1822 * @param {number} height1823 * @return {undefined}1824 */1825WebGLRenderingContext.prototype.renderbufferStorage = function(1826 target, internalformat, width, height) {};1827/**1828 * @param {number} coverage1829 * @param {boolean} invert1830 * @return {undefined}1831 */1832WebGLRenderingContext.prototype.sampleCoverage = function(coverage, invert) {};1833/**1834 * @param {number} x1835 * @param {number} y1836 * @param {number} width1837 * @param {number} height1838 * @return {undefined}1839 */1840WebGLRenderingContext.prototype.scissor = function(x, y, width, height) {};1841/**1842 * @param {WebGLShader} shader1843 * @param {string} source1844 * @return {undefined}1845 */1846WebGLRenderingContext.prototype.shaderSource = function(shader, source) {};1847/**1848 * @param {number} func1849 * @param {number} ref1850 * @param {number} mask1851 * @return {undefined}1852 */1853WebGLRenderingContext.prototype.stencilFunc = function(func, ref, mask) {};1854/**1855 * @param {number} face1856 * @param {number} func1857 * @param {number} ref1858 * @param {number} mask1859 * @return {undefined}1860 */1861WebGLRenderingContext.prototype.stencilFuncSeparate = function(1862 face, func, ref, mask) {};1863/**1864 * @param {number} mask1865 * @return {undefined}1866 */1867WebGLRenderingContext.prototype.stencilMask = function(mask) {};1868/**1869 * @param {number} face1870 * @param {number} mask1871 * @return {undefined}1872 */1873WebGLRenderingContext.prototype.stencilMaskSeparate = function(face, mask) {};1874/**1875 * @param {number} fail1876 * @param {number} zfail1877 * @param {number} zpass1878 * @return {undefined}1879 */1880WebGLRenderingContext.prototype.stencilOp = function(fail, zfail, zpass) {};1881/**1882 * @param {number} face1883 * @param {number} fail1884 * @param {number} zfail1885 * @param {number} zpass1886 * @return {undefined}1887 */1888WebGLRenderingContext.prototype.stencilOpSeparate = function(1889 face, fail, zfail, zpass) {};1890/**1891 * @param {number} target1892 * @param {number} level1893 * @param {number} internalformat1894 * @param {number} format or width1895 * @param {number} type or height1896 * @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|1897 * number} img or border1898 * @param {number=} opt_format1899 * @param {number=} opt_type1900 * @param {ArrayBufferView=} opt_pixels1901 * @return {undefined}1902 */1903WebGLRenderingContext.prototype.texImage2D = function(1904 target, level, internalformat, format, type, img, opt_format, opt_type,1905 opt_pixels) {};1906/**1907 * @param {number} target1908 * @param {number} pname1909 * @param {number} param1910 * @return {undefined}1911 */1912WebGLRenderingContext.prototype.texParameterf = function(1913 target, pname, param) {};1914/**1915 * @param {number} target1916 * @param {number} pname1917 * @param {number} param1918 * @return {undefined}1919 */1920WebGLRenderingContext.prototype.texParameteri = function(1921 target, pname, param) {};1922/**1923 * @param {number} target1924 * @param {number} level1925 * @param {number} xoffset1926 * @param {number} yoffset1927 * @param {number} format or width1928 * @param {number} type or height1929 * @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|1930 * number} data or format1931 * @param {number=} opt_type1932 * @param {ArrayBufferView=} opt_pixels1933 * @return {undefined}1934 */1935WebGLRenderingContext.prototype.texSubImage2D = function(1936 target, level, xoffset, yoffset, format, type, data, opt_type,1937 opt_pixels) {};1938/**1939 * @param {WebGLUniformLocation} location1940 * @param {number} value1941 * @return {undefined}1942 */1943WebGLRenderingContext.prototype.uniform1f = function(location, value) {};1944/**1945 * @param {WebGLUniformLocation} location1946 * @param {Float32Array|Array<number>} value1947 * @return {undefined}1948 */1949WebGLRenderingContext.prototype.uniform1fv = function(location, value) {};1950/**1951 * @param {WebGLUniformLocation} location1952 * @param {number|boolean} value1953 * @return {undefined}1954 */1955WebGLRenderingContext.prototype.uniform1i = function(location, value) {};1956/**1957 * @param {WebGLUniformLocation} location1958 * @param {Int32Array|Array<number>|Array<boolean>} value1959 * @return {undefined}1960 */1961WebGLRenderingContext.prototype.uniform1iv = function(location, value) {};1962/**1963 * @param {WebGLUniformLocation} location1964 * @param {number} value11965 * @param {number} value21966 * @return {undefined}1967 */1968WebGLRenderingContext.prototype.uniform2f = function(1969 location, value1, value2) {};1970/**1971 * @param {WebGLUniformLocation} location1972 * @param {Float32Array|Array<number>} value1973 * @return {undefined}1974 */1975WebGLRenderingContext.prototype.uniform2fv = function(location, value) {};1976/**1977 * @param {WebGLUniformLocation} location1978 * @param {number|boolean} value11979 * @param {number|boolean} value21980 * @return {undefined}1981 */1982WebGLRenderingContext.prototype.uniform2i = function(1983 location, value1, value2) {};1984/**1985 * @param {WebGLUniformLocation} location1986 * @param {Int32Array|Array<number>|Array<boolean>} value1987 * @return {undefined}1988 */1989WebGLRenderingContext.prototype.uniform2iv = function(location, value) {};1990/**1991 * @param {WebGLUniformLocation} location1992 * @param {number} value11993 * @param {number} value21994 * @param {number} value31995 * @return {undefined}1996 */1997WebGLRenderingContext.prototype.uniform3f = function(1998 location, value1, value2, value3) {};1999/**2000 * @param {WebGLUniformLocation} location2001 * @param {Float32Array|Array<number>} value2002 * @return {undefined}2003 */2004WebGLRenderingContext.prototype.uniform3fv = function(location, value) {};2005/**2006 * @param {WebGLUniformLocation} location2007 * @param {number|boolean} value12008 * @param {number|boolean} value22009 * @param {number|boolean} value32010 * @return {undefined}2011 */2012WebGLRenderingContext.prototype.uniform3i = function(2013 location, value1, value2, value3) {};2014/**2015 * @param {WebGLUniformLocation} location2016 * @param {Int32Array|Array<number>|Array<boolean>} value2017 * @return {undefined}2018 */2019WebGLRenderingContext.prototype.uniform3iv = function(location, value) {};2020/**2021 * @param {WebGLUniformLocation} location2022 * @param {number} value12023 * @param {number} value22024 * @param {number} value32025 * @param {number} value42026 * @return {undefined}2027 */2028WebGLRenderingContext.prototype.uniform4f = function(2029 location, value1, value2, value3, value4) {};2030/**2031 * @param {WebGLUniformLocation} location2032 * @param {Float32Array|Array<number>} value2033 * @return {undefined}2034 */2035WebGLRenderingContext.prototype.uniform4fv = function(location, value) {};2036/**2037 * @param {WebGLUniformLocation} location2038 * @param {number|boolean} value12039 * @param {number|boolean} value22040 * @param {number|boolean} value32041 * @param {number|boolean} value42042 * @return {undefined}2043 */2044WebGLRenderingContext.prototype.uniform4i = function(2045 location, value1, value2, value3, value4) {};2046/**2047 * @param {WebGLUniformLocation} location2048 * @param {Int32Array|Array<number>|Array<boolean>} value2049 * @return {undefined}2050 */2051WebGLRenderingContext.prototype.uniform4iv = function(location, value) {};2052/**2053 * @param {WebGLUniformLocation} location2054 * @param {boolean} transpose2055 * @param {Float32Array|Array<number>} data2056 * @return {undefined}2057 */2058WebGLRenderingContext.prototype.uniformMatrix2fv = function(2059 location, transpose, data) {};2060/**2061 * @param {WebGLUniformLocation} location2062 * @param {boolean} transpose2063 * @param {Float32Array|Array<number>} data2064 * @return {undefined}2065 */2066WebGLRenderingContext.prototype.uniformMatrix3fv = function(2067 location, transpose, data) {};2068/**2069 * @param {WebGLUniformLocation} location2070 * @param {boolean} transpose2071 * @param {Float32Array|Array<number>} data2072 * @return {undefined}2073 */2074WebGLRenderingContext.prototype.uniformMatrix4fv = function(2075 location, transpose, data) {};2076/**2077 * @param {WebGLProgram} program2078 * @return {undefined}2079 */2080WebGLRenderingContext.prototype.useProgram = function(program) {};2081/**2082 * @param {WebGLProgram} program2083 * @return {undefined}2084 */2085WebGLRenderingContext.prototype.validateProgram = function(program) {};2086/**2087 * @param {number} indx2088 * @param {number} x2089 * @return {undefined}2090 */2091WebGLRenderingContext.prototype.vertexAttrib1f = function(indx, x) {};2092/**2093 * @param {number} indx2094 * @param {Float32Array|Array<number>} values2095 * @return {undefined}2096 */2097WebGLRenderingContext.prototype.vertexAttrib1fv = function(indx, values) {};2098/**2099 * @param {number} indx2100 * @param {number} x2101 * @param {number} y2102 * @return {undefined}2103 */2104WebGLRenderingContext.prototype.vertexAttrib2f = function(2105 indx, x, y) {};2106/**2107 * @param {number} indx2108 * @param {Float32Array|Array<number>} values2109 * @return {undefined}2110 */2111WebGLRenderingContext.prototype.vertexAttrib2fv = function(2112 indx, values) {};2113/**2114 * @param {number} indx2115 * @param {number} x2116 * @param {number} y2117 * @param {number} z2118 * @return {undefined}2119 */2120WebGLRenderingContext.prototype.vertexAttrib3f = function(2121 indx, x, y, z) {};2122/**2123 * @param {number} indx2124 * @param {Float32Array|Array<number>} values2125 * @return {undefined}2126 */2127WebGLRenderingContext.prototype.vertexAttrib3fv = function(indx, values) {};2128/**2129 * @param {number} indx2130 * @param {number} x2131 * @param {number} y2132 * @param {number} z2133 * @param {number} w2134 * @return {undefined}2135 */2136WebGLRenderingContext.prototype.vertexAttrib4f = function(2137 indx, x, y, z, w) {};2138/**2139 * @param {number} indx2140 * @param {Float32Array|Array<number>} values2141 * @return {undefined}2142 */2143WebGLRenderingContext.prototype.vertexAttrib4fv = function(indx, values) {};2144/**2145 * @param {number} indx2146 * @param {number} size2147 * @param {number} type2148 * @param {boolean} normalized2149 * @param {number} stride2150 * @param {number} offset2151 * @return {undefined}2152 */2153WebGLRenderingContext.prototype.vertexAttribPointer = function(2154 indx, size, type, normalized, stride, offset) {};2155/**2156 * @param {number} x2157 * @param {number} y2158 * @param {number} width2159 * @param {number} height2160 * @return {undefined}2161 */2162WebGLRenderingContext.prototype.viewport = function(x, y, width, height) {};2163/**2164 * @constructor2165 * @noalias2166 */2167function WebGLContextAttributes() {}2168/**2169 * @type {boolean}2170 */2171WebGLContextAttributes.prototype.alpha;2172/**2173 * @type {boolean}2174 */2175WebGLContextAttributes.prototype.depth;2176/**2177 * @type {boolean}2178 */2179WebGLContextAttributes.prototype.stencil;2180/**2181 * @type {boolean}2182 */2183WebGLContextAttributes.prototype.antialias;2184/**2185 * @type {boolean}2186 */2187WebGLContextAttributes.prototype.premultipliedAlpha;2188/**2189 * @type {boolean}2190 */2191WebGLContextAttributes.prototype.preserveDrawingBuffer;2192/**2193 * @type {boolean}2194 */2195WebGLContextAttributes.prototype.preferLowPowerToHighPerformance;2196/**2197 * @type {boolean}2198 */2199WebGLContextAttributes.prototype.failIfMajorPerformanceCaveat;2200/**2201 * @param {string} eventType2202 * @constructor2203 * @noalias2204 * @extends {Event}2205 */2206function WebGLContextEvent(eventType) {}2207/**2208 * @type {string}2209 */2210WebGLContextEvent.prototype.statusMessage;2211/**2212 * @constructor2213 * @noalias2214 */2215function WebGLShaderPrecisionFormat() {}2216/**2217 * @type {number}2218 */2219WebGLShaderPrecisionFormat.prototype.rangeMin;2220/**2221 * @type {number}2222 */2223WebGLShaderPrecisionFormat.prototype.rangeMax;2224/**2225 * @type {number}2226 */2227WebGLShaderPrecisionFormat.prototype.precision;2228/**2229 * @constructor2230 * @noalias2231 */2232function WebGLObject() {}2233/**2234 * @constructor2235 * @noalias2236 * @extends {WebGLObject}2237 */2238function WebGLBuffer() {}2239/**2240 * @constructor2241 * @noalias2242 * @extends {WebGLObject}2243 */2244function WebGLFramebuffer() {}2245/**2246 * @constructor2247 * @noalias2248 * @extends {WebGLObject}2249 */2250function WebGLProgram() {}2251/**2252 * @constructor2253 * @noalias2254 * @extends {WebGLObject}2255 */2256function WebGLRenderbuffer() {}2257/**2258 * @constructor2259 * @noalias2260 * @extends {WebGLObject}2261 */2262function WebGLShader() {}2263/**2264 * @constructor2265 * @noalias2266 * @extends {WebGLObject}2267 */2268function WebGLTexture() {}2269/**2270 * @constructor2271 * @noalias2272 */2273function WebGLActiveInfo() {}2274/** @type {number} */2275WebGLActiveInfo.prototype.size;2276/** @type {number} */2277WebGLActiveInfo.prototype.type;2278/** @type {string} */2279WebGLActiveInfo.prototype.name;2280/**2281 * @constructor2282 * @noalias2283 */2284function WebGLUniformLocation() {}2285/**2286 * @see http://www.khronos.org/registry/webgl/extensions/OES_texture_float/2287 * @constructor2288 * @noalias2289 */2290function OES_texture_float() {}2291/**2292 * @see http://www.khronos.org/registry/webgl/extensions/OES_texture_half_float/2293 * @constructor2294 * @noalias2295 */2296function OES_texture_half_float() {}2297/** @type {number} */2298OES_texture_half_float.prototype.HALF_FLOAT_OES;2299/**2300 * @see http://www.khronos.org/registry/webgl/extensions/WEBGL_lose_context/2301 * @constructor2302 * @noalias2303 */2304function WEBGL_lose_context() {}2305WEBGL_lose_context.prototype.loseContext = function() {};2306WEBGL_lose_context.prototype.restoreContext = function() {};2307/**2308 * @see http://www.khronos.org/registry/webgl/extensions/OES_standard_derivatives/2309 * @constructor2310 * @noalias2311 */2312function OES_standard_derivatives() {}2313/** @type {number} */2314OES_standard_derivatives.prototype.FRAGMENT_SHADER_DERIVATIVE_HINT_OES;2315/**2316 * @see http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/2317 * @constructor2318 * @noalias2319 * @extends {WebGLObject}2320 */2321function WebGLVertexArrayObjectOES() {}2322/**2323 * @see http://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/2324 * @constructor2325 * @noalias2326 */2327function OES_vertex_array_object() {}2328/** @type {number} */2329OES_vertex_array_object.prototype.VERTEX_ARRAY_BINDING_OES;2330/**2331 * @return {WebGLVertexArrayObjectOES}2332 * @nosideeffects2333 */2334OES_vertex_array_object.prototype.createVertexArrayOES = function() {};2335/**2336 * @param {WebGLVertexArrayObjectOES} arrayObject2337 * @return {undefined}2338 */2339OES_vertex_array_object.prototype.deleteVertexArrayOES =2340 function(arrayObject) {};2341/**2342 * @param {WebGLVertexArrayObjectOES} arrayObject2343 * @return {boolean}2344 * @nosideeffects2345 */2346OES_vertex_array_object.prototype.isVertexArrayOES = function(arrayObject) {};2347/**2348 * @param {WebGLVertexArrayObjectOES} arrayObject2349 * @return {undefined}2350 */2351OES_vertex_array_object.prototype.bindVertexArrayOES = function(arrayObject) {};2352/**2353 * @see http://www.khronos.org/registry/webgl/extensions/WEBGL_debug_renderer_info/2354 * @constructor2355 * @noalias2356 */2357function WEBGL_debug_renderer_info() {}2358/** @type {number} */2359WEBGL_debug_renderer_info.prototype.UNMASKED_VENDOR_WEBGL;2360/** @type {number} */2361WEBGL_debug_renderer_info.prototype.UNMASKED_RENDERER_WEBGL;2362/**2363 * @see http://www.khronos.org/registry/webgl/extensions/WEBGL_debug_shaders/2364 * @constructor2365 * @noalias2366 */2367function WEBGL_debug_shaders() {}2368/**2369 * @param {WebGLShader} shader2370 * @return {string}2371 * @nosideeffects2372 */2373WEBGL_debug_shaders.prototype.getTranslatedShaderSource = function(shader) {};2374/**2375 * @see http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/2376 * @constructor2377 * @noalias2378 */2379function WEBGL_compressed_texture_s3tc() {}2380/** @type {number} */2381WEBGL_compressed_texture_s3tc.prototype.COMPRESSED_RGB_S3TC_DXT1_EXT;2382/** @type {number} */2383WEBGL_compressed_texture_s3tc.prototype.COMPRESSED_RGBA_S3TC_DXT1_EXT;2384/** @type {number} */2385WEBGL_compressed_texture_s3tc.prototype.COMPRESSED_RGBA_S3TC_DXT3_EXT;2386/** @type {number} */2387WEBGL_compressed_texture_s3tc.prototype.COMPRESSED_RGBA_S3TC_DXT5_EXT;2388/**2389 * @see http://www.khronos.org/registry/webgl/extensions/OES_depth_texture/2390 * @constructor2391 * @noalias2392 */2393function OES_depth_texture() {}2394/**2395 * @see http://www.khronos.org/registry/webgl/extensions/OES_element_index_uint/2396 * @constructor2397 * @noalias2398 */2399function OES_element_index_uint() {}2400/**2401 * @see http://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/2402 * @constructor2403 * @noalias2404 */2405function EXT_texture_filter_anisotropic() {}2406/** @type {number} */2407EXT_texture_filter_anisotropic.prototype.TEXTURE_MAX_ANISOTROPY_EXT;2408/** @type {number} */2409EXT_texture_filter_anisotropic.prototype.MAX_TEXTURE_MAX_ANISOTROPY_EXT;2410/**2411 * @see https://www.khronos.org/registry/webgl/extensions/WEBGL_draw_buffers/2412 * @constructor2413 * @noalias2414 */2415function WEBGL_draw_buffers() {}2416/** @type {number} */2417WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT0_WEBGL;2418/** @type {number} */2419WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT1_WEBGL;2420/** @type {number} */2421WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT2_WEBGL;2422/** @type {number} */2423WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT3_WEBGL;2424/** @type {number} */2425WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT4_WEBGL;2426/** @type {number} */2427WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT5_WEBGL;2428/** @type {number} */2429WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT6_WEBGL;2430/** @type {number} */2431WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT7_WEBGL;2432/** @type {number} */2433WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT8_WEBGL;2434/** @type {number} */2435WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT9_WEBGL;2436/** @type {number} */2437WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT10_WEBGL;2438/** @type {number} */2439WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT11_WEBGL;2440/** @type {number} */2441WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT12_WEBGL;2442/** @type {number} */2443WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT13_WEBGL;2444/** @type {number} */2445WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT14_WEBGL;2446/** @type {number} */2447WEBGL_draw_buffers.prototype.COLOR_ATTACHMENT15_WEBGL;2448/** @type {number} */2449WEBGL_draw_buffers.prototype.DRAW_BUFFER0_WEBGL;2450/** @type {number} */2451WEBGL_draw_buffers.prototype.DRAW_BUFFER1_WEBGL;2452/** @type {number} */2453WEBGL_draw_buffers.prototype.DRAW_BUFFER2_WEBGL;2454/** @type {number} */2455WEBGL_draw_buffers.prototype.DRAW_BUFFER3_WEBGL;2456/** @type {number} */2457WEBGL_draw_buffers.prototype.DRAW_BUFFER4_WEBGL;2458/** @type {number} */2459WEBGL_draw_buffers.prototype.DRAW_BUFFER5_WEBGL;2460/** @type {number} */2461WEBGL_draw_buffers.prototype.DRAW_BUFFER6_WEBGL;2462/** @type {number} */2463WEBGL_draw_buffers.prototype.DRAW_BUFFER7_WEBGL;2464/** @type {number} */2465WEBGL_draw_buffers.prototype.DRAW_BUFFER8_WEBGL;2466/** @type {number} */2467WEBGL_draw_buffers.prototype.DRAW_BUFFER9_WEBGL;2468/** @type {number} */2469WEBGL_draw_buffers.prototype.DRAW_BUFFER10_WEBGL;2470/** @type {number} */2471WEBGL_draw_buffers.prototype.DRAW_BUFFER11_WEBGL;2472/** @type {number} */2473WEBGL_draw_buffers.prototype.DRAW_BUFFER12_WEBGL;2474/** @type {number} */2475WEBGL_draw_buffers.prototype.DRAW_BUFFER13_WEBGL;2476/** @type {number} */2477WEBGL_draw_buffers.prototype.DRAW_BUFFER14_WEBGL;2478/** @type {number} */2479WEBGL_draw_buffers.prototype.DRAW_BUFFER15_WEBGL;2480/** @type {number} */2481WEBGL_draw_buffers.prototype.MAX_COLOR_ATTACHMENTS_WEBGL;2482/** @type {number} */2483WEBGL_draw_buffers.prototype.MAX_DRAW_BUFFERS_WEBGL;2484/**2485 * @param {Array<number>} buffers Draw buffers.2486 * @return {undefined}2487 */2488WEBGL_draw_buffers.prototype.drawBuffersWEBGL = function(buffers) {};2489/**2490 * @see http://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/2491 * @constructor2492 * @noalias2493 */2494function ANGLE_instanced_arrays() {}2495/** @type {number} */2496ANGLE_instanced_arrays.prototype.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE;2497/**2498 * @param {number} mode Primitive type.2499 * @param {number} first First vertex.2500 * @param {number} count Number of vertices per instance.2501 * @param {number} primcount Number of instances.2502 * @return {undefined}2503 */2504ANGLE_instanced_arrays.prototype.drawArraysInstancedANGLE = function(2505 mode, first, count, primcount) {};2506/**2507 * @param {number} mode Primitive type.2508 * @param {number} count Number of vertex indices per instance.2509 * @param {number} type Type of a vertex index.2510 * @param {number} offset Offset to the first vertex index.2511 * @param {number} primcount Number of instances.2512 * @return {undefined}2513 */2514ANGLE_instanced_arrays.prototype.drawElementsInstancedANGLE = function(2515 mode, count, type, offset, primcount) {};2516/**2517 * @param {number} index Attribute index.2518 * @param {number} divisor Instance divisor.2519 * @return {undefined}2520 */2521ANGLE_instanced_arrays.prototype.vertexAttribDivisorANGLE = function(...

Full Screen

Full Screen

websocket_test.js

Source:websocket_test.js Github

copy

Full Screen

1// Copyright 2011 The Closure Library Authors. All Rights Reserved.2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS-IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.14goog.provide('goog.net.WebSocketTest');15goog.setTestOnly('goog.net.WebSocketTest');16goog.require('goog.debug.EntryPointMonitor');17goog.require('goog.debug.ErrorHandler');18goog.require('goog.debug.entryPointRegistry');19goog.require('goog.events');20goog.require('goog.functions');21goog.require('goog.net.WebSocket');22goog.require('goog.testing.MockClock');23goog.require('goog.testing.PropertyReplacer');24goog.require('goog.testing.jsunit');25goog.require('goog.testing.recordFunction');26var webSocket;27var mockClock;28var pr;29var testUrl;30var originalOnOpen = goog.net.WebSocket.prototype.onOpen_;31var originalOnClose = goog.net.WebSocket.prototype.onClose_;32var originalOnMessage = goog.net.WebSocket.prototype.onMessage_;33var originalOnError = goog.net.WebSocket.prototype.onError_;34function setUp() {35 pr = new goog.testing.PropertyReplacer();36 pr.set(goog.global, 'WebSocket', MockWebSocket);37 mockClock = new goog.testing.MockClock(true);38 testUrl = 'ws://127.0.0.1:4200';39 testProtocol = 'xmpp';40}41function tearDown() {42 pr.reset();43 goog.net.WebSocket.prototype.onOpen_ = originalOnOpen;44 goog.net.WebSocket.prototype.onClose_ = originalOnClose;45 goog.net.WebSocket.prototype.onMessage_ = originalOnMessage;46 goog.net.WebSocket.prototype.onError_ = originalOnError;47 goog.dispose(mockClock);48 goog.dispose(webSocket);49}50function testOpenInUnsupportingBrowserThrowsException() {51 // Null out WebSocket to simulate lack of support.52 if (goog.global.WebSocket) {53 goog.global.WebSocket = null;54 }55 webSocket = new goog.net.WebSocket();56 assertThrows('Open should fail if WebSocket is not defined.', function() {57 webSocket.open(testUrl);58 });59}60function testOpenTwiceThrowsException() {61 webSocket = new goog.net.WebSocket();62 webSocket.open(testUrl);63 simulateOpenEvent(webSocket.webSocket_);64 assertThrows('Attempting to open a second time should fail.', function() {65 webSocket.open(testUrl);66 });67}68function testSendWithoutOpeningThrowsException() {69 webSocket = new goog.net.WebSocket();70 assertThrows(71 'Send should fail if the web socket was not first opened.',72 function() { webSocket.send('test message'); });73}74function testOpenWithProtocol() {75 webSocket = new goog.net.WebSocket();76 webSocket.open(testUrl, testProtocol);77 var ws = webSocket.webSocket_;78 simulateOpenEvent(ws);79 assertEquals(testUrl, ws.url);80 assertEquals(testProtocol, ws.protocol);81}82function testOpenAndClose() {83 webSocket = new goog.net.WebSocket();84 assertFalse(webSocket.isOpen());85 webSocket.open(testUrl);86 var ws = webSocket.webSocket_;87 simulateOpenEvent(ws);88 assertTrue(webSocket.isOpen());89 assertEquals(testUrl, ws.url);90 webSocket.close();91 simulateCloseEvent(ws);92 assertFalse(webSocket.isOpen());93}94function testReconnectionDisabled() {95 // Construct the web socket and disable reconnection.96 webSocket = new goog.net.WebSocket(false);97 // Record how many times open is called.98 pr.set(webSocket, 'open', goog.testing.recordFunction(webSocket.open));99 // Open the web socket.100 webSocket.open(testUrl);101 assertEquals(0, webSocket.reconnectAttempt_);102 assertEquals(1, webSocket.open.getCallCount());103 assertFalse(webSocket.isOpen());104 // Simulate failure.105 var ws = webSocket.webSocket_;106 simulateCloseEvent(ws);107 assertFalse(webSocket.isOpen());108 assertEquals(0, webSocket.reconnectAttempt_);109 assertEquals(1, webSocket.open.getCallCount());110 // Make sure a reconnection doesn't happen.111 mockClock.tick(100000);112 assertEquals(0, webSocket.reconnectAttempt_);113 assertEquals(1, webSocket.open.getCallCount());114}115function testReconnectionWithFailureOnFirstOpen() {116 // Construct the web socket with a linear back-off.117 webSocket = new goog.net.WebSocket(true, linearBackOff);118 // Record how many times open is called.119 pr.set(webSocket, 'open', goog.testing.recordFunction(webSocket.open));120 // Open the web socket.121 webSocket.open(testUrl, testProtocol);122 assertEquals(0, webSocket.reconnectAttempt_);123 assertEquals(1, webSocket.open.getCallCount());124 assertFalse(webSocket.isOpen());125 // Simulate failure.126 var ws = webSocket.webSocket_;127 simulateCloseEvent(ws);128 assertFalse(webSocket.isOpen());129 assertEquals(1, webSocket.reconnectAttempt_);130 assertEquals(1, webSocket.open.getCallCount());131 // Make sure the reconnect doesn't happen before it should.132 mockClock.tick(linearBackOff(0) - 1);133 assertEquals(1, webSocket.open.getCallCount());134 mockClock.tick(1);135 assertEquals(2, webSocket.open.getCallCount());136 // Simulate another failure.137 simulateCloseEvent(ws);138 assertFalse(webSocket.isOpen());139 assertEquals(2, webSocket.reconnectAttempt_);140 assertEquals(2, webSocket.open.getCallCount());141 // Make sure the reconnect doesn't happen before it should.142 mockClock.tick(linearBackOff(1) - 1);143 assertEquals(2, webSocket.open.getCallCount());144 mockClock.tick(1);145 assertEquals(3, webSocket.open.getCallCount());146 // Simulate connection success.147 simulateOpenEvent(ws);148 assertEquals(0, webSocket.reconnectAttempt_);149 assertEquals(3, webSocket.open.getCallCount());150 // Make sure the reconnection has the same url and protocol.151 assertEquals(testUrl, ws.url);152 assertEquals(testProtocol, ws.protocol);153 // Ensure no further calls to open are made.154 mockClock.tick(linearBackOff(10));155 assertEquals(3, webSocket.open.getCallCount());156}157function testReconnectionWithFailureAfterOpen() {158 // Construct the web socket with a linear back-off.159 webSocket = new goog.net.WebSocket(true, fibonacciBackOff);160 // Record how many times open is called.161 pr.set(webSocket, 'open', goog.testing.recordFunction(webSocket.open));162 // Open the web socket.163 webSocket.open(testUrl);164 assertEquals(0, webSocket.reconnectAttempt_);165 assertEquals(1, webSocket.open.getCallCount());166 assertFalse(webSocket.isOpen());167 // Simulate connection success.168 var ws = webSocket.webSocket_;169 simulateOpenEvent(ws);170 assertEquals(0, webSocket.reconnectAttempt_);171 assertEquals(1, webSocket.open.getCallCount());172 // Let some time pass, then fail the connection.173 mockClock.tick(100000);174 simulateCloseEvent(ws);175 assertFalse(webSocket.isOpen());176 assertEquals(1, webSocket.reconnectAttempt_);177 assertEquals(1, webSocket.open.getCallCount());178 // Make sure the reconnect doesn't happen before it should.179 mockClock.tick(fibonacciBackOff(0) - 1);180 assertEquals(1, webSocket.open.getCallCount());181 mockClock.tick(1);182 assertEquals(2, webSocket.open.getCallCount());183 // Simulate connection success.184 ws = webSocket.webSocket_;185 simulateOpenEvent(ws);186 assertEquals(0, webSocket.reconnectAttempt_);187 assertEquals(2, webSocket.open.getCallCount());188 // Ensure no further calls to open are made.189 mockClock.tick(fibonacciBackOff(10));190 assertEquals(2, webSocket.open.getCallCount());191}192function testExponentialBackOff() {193 assertEquals(1000, goog.net.WebSocket.EXPONENTIAL_BACKOFF_(0));194 assertEquals(2000, goog.net.WebSocket.EXPONENTIAL_BACKOFF_(1));195 assertEquals(4000, goog.net.WebSocket.EXPONENTIAL_BACKOFF_(2));196 assertEquals(60000, goog.net.WebSocket.EXPONENTIAL_BACKOFF_(6));197 assertEquals(60000, goog.net.WebSocket.EXPONENTIAL_BACKOFF_(7));198}199function testEntryPointRegistry() {200 var monitor = new goog.debug.EntryPointMonitor();201 var replacement = function() {};202 monitor.wrap =203 goog.testing.recordFunction(goog.functions.constant(replacement));204 goog.debug.entryPointRegistry.monitorAll(monitor);205 assertTrue(monitor.wrap.getCallCount() >= 1);206 assertEquals(replacement, goog.net.WebSocket.prototype.onOpen_);207 assertEquals(replacement, goog.net.WebSocket.prototype.onClose_);208 assertEquals(replacement, goog.net.WebSocket.prototype.onMessage_);209 assertEquals(replacement, goog.net.WebSocket.prototype.onError_);210}211function testErrorHandlerCalled() {212 var errorHandlerCalled = false;213 var errorHandler =214 new goog.debug.ErrorHandler(function() { errorHandlerCalled = true; });215 goog.net.WebSocket.protectEntryPoints(errorHandler);216 webSocket = new goog.net.WebSocket();217 goog.events.listenOnce(218 webSocket, goog.net.WebSocket.EventType.OPENED,219 function() { throw Error(); });220 webSocket.open(testUrl);221 var ws = webSocket.webSocket_;222 assertThrows(function() { simulateOpenEvent(ws); });223 assertTrue(224 'Error handler callback should be called when registered as ' +225 'protecting the entry points.',226 errorHandlerCalled);227}228/**229 * Simulates the browser firing the open event for the given web socket.230 * @param {MockWebSocket} ws The mock web socket.231 */232function simulateOpenEvent(ws) {233 ws.readyState = goog.net.WebSocket.ReadyState_.OPEN;234 ws.onopen();235}236/**237 * Simulates the browser firing the close event for the given web socket.238 * @param {MockWebSocket} ws The mock web socket.239 */240function simulateCloseEvent(ws) {241 ws.readyState = goog.net.WebSocket.ReadyState_.CLOSED;242 ws.onclose({data: 'mock close event'});243}244/**245 * Strategy for reconnection that backs off linearly with a 1 second offset.246 * @param {number} attempt The number of reconnects since the last connection.247 * @return {number} The amount of time to the next reconnect, in milliseconds.248 */249function linearBackOff(attempt) {250 return (attempt * 1000) + 1000;251}252/**253 * Strategy for reconnection that backs off with the fibonacci pattern. It is254 * offset by 5 seconds so the first attempt will happen after 5 seconds.255 * @param {number} attempt The number of reconnects since the last connection.256 * @return {number} The amount of time to the next reconnect, in milliseconds.257 */258function fibonacciBackOff(attempt) {259 return (fibonacci(attempt) * 1000) + 5000;260}261/**262 * Computes the desired fibonacci number.263 * @param {number} n The nth desired fibonacci number.264 * @return {number} The nth fibonacci number.265 */266function fibonacci(n) {267 if (n == 0) {268 return 0;269 } else if (n == 1) {270 return 1;271 } else {272 return fibonacci(n - 2) + fibonacci(n - 1);273 }274}275/**276 * Mock WebSocket constructor.277 * @param {string} url The url to the web socket server.278 * @param {string} protocol The protocol to use.279 * @constructor280 */281MockWebSocket = function(url, protocol) {282 this.url = url;283 this.protocol = protocol;284 this.readyState = goog.net.WebSocket.ReadyState_.CONNECTING;285};286/**287 * Mocks out the close method of the WebSocket.288 */289MockWebSocket.prototype.close = function() {290 this.readyState = goog.net.WebSocket.ReadyState_.CLOSING;291};292/**293 * Mocks out the send method of the WebSocket.294 */295MockWebSocket.prototype.send = function() {296 // Nothing to do here....

Full Screen

Full Screen

webchannelbasetransport_test.js

Source:webchannelbasetransport_test.js Github

copy

Full Screen

1// Copyright 2013 The Closure Library Authors. All Rights Reserved.2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS-IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.14/**15 * @fileoverview Unit tests for goog.labs.net.webChannel.WebChannelBase.16 * @suppress {accessControls} Private methods are accessed for test purposes.17 *18 */19goog.provide('goog.labs.net.webChannel.webChannelBaseTransportTest');20goog.require('goog.events');21goog.require('goog.functions');22goog.require('goog.json');23goog.require('goog.labs.net.webChannel.ChannelRequest');24goog.require('goog.labs.net.webChannel.WebChannelBase');25goog.require('goog.labs.net.webChannel.WebChannelBaseTransport');26goog.require('goog.net.WebChannel');27goog.require('goog.testing.PropertyReplacer');28goog.require('goog.testing.jsunit');29goog.setTestOnly('goog.labs.net.webChannel.webChannelBaseTransportTest');30var webChannel;31var channelUrl = 'http://127.0.0.1:8080/channel';32var stubs = new goog.testing.PropertyReplacer();33function shouldRunTests() {34 return goog.labs.net.webChannel.ChannelRequest.supportsXhrStreaming();35}36function setUp() {}37function tearDown() {38 goog.dispose(webChannel);39 stubs.reset();40}41/**42 * Stubs goog.labs.net.webChannel.ChannelRequest.43 */44function stubChannelRequest() {45 stubs.set(46 goog.labs.net.webChannel.ChannelRequest, 'supportsXhrStreaming',47 goog.functions.FALSE);48}49function testUnsupportedTransports() {50 stubChannelRequest();51 var err = assertThrows(function() {52 var webChannelTransport =53 new goog.labs.net.webChannel.WebChannelBaseTransport();54 });55 assertContains('error', err.message);56}57function testOpenWithUrl() {58 var webChannelTransport =59 new goog.labs.net.webChannel.WebChannelBaseTransport();60 webChannel = webChannelTransport.createWebChannel(channelUrl);61 var eventFired = false;62 goog.events.listen(63 webChannel, goog.net.WebChannel.EventType.OPEN,64 function(e) { eventFired = true; });65 webChannel.open();66 assertFalse(eventFired);67 var channel = webChannel.channel_;68 assertNotNull(channel);69 simulateOpenEvent(channel);70 assertTrue(eventFired);71}72function testOpenWithTestUrl() {73 var webChannelTransport =74 new goog.labs.net.webChannel.WebChannelBaseTransport();75 var options = {'testUrl': channelUrl + '/footest'};76 webChannel = webChannelTransport.createWebChannel(channelUrl, options);77 webChannel.open();78 var testPath = webChannel.channel_.connectionTest_.path_;79 assertNotNullNorUndefined(testPath);80}81function testOpenWithCustomHeaders() {82 var webChannelTransport =83 new goog.labs.net.webChannel.WebChannelBaseTransport();84 var options = {'messageHeaders': {'foo-key': 'foo-value'}};85 webChannel = webChannelTransport.createWebChannel(channelUrl, options);86 webChannel.open();87 var extraHeaders_ = webChannel.channel_.extraHeaders_;88 assertNotNullNorUndefined(extraHeaders_);89 assertEquals('foo-value', extraHeaders_['foo-key']);90 assertEquals(undefined, extraHeaders_['X-Client-Protocol']);91}92function testClientProtocolHeaderRequired() {93 var webChannelTransport =94 new goog.labs.net.webChannel.WebChannelBaseTransport();95 var options = {'clientProtocolHeaderRequired': true};96 webChannel = webChannelTransport.createWebChannel(channelUrl, options);97 webChannel.open();98 var extraHeaders_ = webChannel.channel_.extraHeaders_;99 assertNotNullNorUndefined(extraHeaders_);100 assertEquals('webchannel', extraHeaders_['X-Client-Protocol']);101}102function testClientProtocolHeaderNotRequiredByDefault() {103 var webChannelTransport =104 new goog.labs.net.webChannel.WebChannelBaseTransport();105 webChannel = webChannelTransport.createWebChannel(channelUrl);106 webChannel.open();107 var extraHeaders_ = webChannel.channel_.extraHeaders_;108 assertNull(extraHeaders_);109}110function testClientProtocolHeaderRequiredWithCustomHeader() {111 var webChannelTransport =112 new goog.labs.net.webChannel.WebChannelBaseTransport();113 var options = {114 'clientProtocolHeaderRequired': true,115 'messageHeaders': {'foo-key': 'foo-value'}116 };117 webChannel = webChannelTransport.createWebChannel(channelUrl, options);118 webChannel.open();119 var extraHeaders_ = webChannel.channel_.extraHeaders_;120 assertNotNullNorUndefined(extraHeaders_);121 assertEquals('foo-value', extraHeaders_['foo-key']);122 assertEquals('webchannel', extraHeaders_['X-Client-Protocol']);123}124function testOpenWithCustomParams() {125 var webChannelTransport =126 new goog.labs.net.webChannel.WebChannelBaseTransport();127 var options = {'messageUrlParams': {'foo-key': 'foo-value'}};128 webChannel = webChannelTransport.createWebChannel(channelUrl, options);129 webChannel.open();130 var extraParams = webChannel.channel_.extraParams_;131 assertNotNullNorUndefined(extraParams);132}133function testOpenWithHttpSessionIdParam() {134 var webChannelTransport =135 new goog.labs.net.webChannel.WebChannelBaseTransport();136 var options = {'httpSessionIdParam': 'xsessionid'};137 webChannel = webChannelTransport.createWebChannel(channelUrl, options);138 webChannel.open();139 var httpSessionIdParam = webChannel.channel_.getHttpSessionIdParam();140 assertEquals('xsessionid', httpSessionIdParam);141}142function testOpenWithDuplicatedHttpSessionIdParam() {143 var webChannelTransport =144 new goog.labs.net.webChannel.WebChannelBaseTransport();145 var options = {146 'messageUrlParams': {'xsessionid': 'abcd1234'},147 'httpSessionIdParam': 'xsessionid'148 };149 webChannel = webChannelTransport.createWebChannel(channelUrl, options);150 webChannel.open();151 var httpSessionIdParam = webChannel.channel_.getHttpSessionIdParam();152 assertEquals('xsessionid', httpSessionIdParam);153 var extraParams = webChannel.channel_.extraParams_;154 assertUndefined(extraParams['xsessionid']);155}156function testOpenWithCorsEnabled() {157 var webChannelTransport =158 new goog.labs.net.webChannel.WebChannelBaseTransport();159 var options = {'supportsCrossDomainXhr': true};160 webChannel = webChannelTransport.createWebChannel(channelUrl, options);161 webChannel.open();162 assertTrue(webChannel.channel_.supportsCrossDomainXhrs_);163}164function testSendRawJson() {165 var channelMsg;166 stubs.set(167 goog.labs.net.webChannel.WebChannelBase.prototype, 'sendMap',168 function(message) { channelMsg = message; });169 var webChannelTransport =170 new goog.labs.net.webChannel.WebChannelBaseTransport();171 var options = {'sendRawJson': true};172 webChannel = webChannelTransport.createWebChannel(channelUrl, options);173 webChannel.open();174 webChannel.send({foo: 'bar'});175 var receivedMsg = goog.json.parse(channelMsg['__data__']);176 assertEquals('bar', receivedMsg.foo);177}178function testOpenThenCloseChannel() {179 var webChannelTransport =180 new goog.labs.net.webChannel.WebChannelBaseTransport();181 webChannel = webChannelTransport.createWebChannel(channelUrl);182 var eventFired = false;183 goog.events.listen(184 webChannel, goog.net.WebChannel.EventType.CLOSE,185 function(e) { eventFired = true; });186 webChannel.open();187 assertFalse(eventFired);188 var channel = webChannel.channel_;189 assertNotNull(channel);190 simulateCloseEvent(channel);191 assertTrue(eventFired);192}193function testChannelError() {194 var webChannelTransport =195 new goog.labs.net.webChannel.WebChannelBaseTransport();196 webChannel = webChannelTransport.createWebChannel(channelUrl);197 var eventFired = false;198 goog.events.listen(199 webChannel, goog.net.WebChannel.EventType.ERROR, function(e) {200 eventFired = true;201 assertEquals(goog.net.WebChannel.ErrorStatus.NETWORK_ERROR, e.status);202 });203 webChannel.open();204 assertFalse(eventFired);205 var channel = webChannel.channel_;206 assertNotNull(channel);207 simulateErrorEvent(channel);208 assertTrue(eventFired);209}210function testChannelMessage() {211 var webChannelTransport =212 new goog.labs.net.webChannel.WebChannelBaseTransport();213 webChannel = webChannelTransport.createWebChannel(channelUrl);214 var eventFired = false;215 var data = 'foo';216 goog.events.listen(217 webChannel, goog.net.WebChannel.EventType.MESSAGE, function(e) {218 eventFired = true;219 assertEquals(e.data, data);220 });221 webChannel.open();222 assertFalse(eventFired);223 var channel = webChannel.channel_;224 assertNotNull(channel);225 simulateMessageEvent(channel, data);226 assertTrue(eventFired);227}228/**229 * Simulates the WebChannelBase firing the open event for the given channel.230 * @param {!goog.labs.net.webChannel.WebChannelBase} channel The WebChannelBase.231 */232function simulateOpenEvent(channel) {233 assertNotNull(channel.getHandler());234 channel.getHandler().channelOpened();235}236/**237 * Simulates the WebChannelBase firing the close event for the given channel.238 * @param {!goog.labs.net.webChannel.WebChannelBase} channel The WebChannelBase.239 */240function simulateCloseEvent(channel) {241 assertNotNull(channel.getHandler());242 channel.getHandler().channelClosed();243}244/**245 * Simulates the WebChannelBase firing the error event for the given channel.246 * @param {!goog.labs.net.webChannel.WebChannelBase} channel The WebChannelBase.247 */248function simulateErrorEvent(channel) {249 assertNotNull(channel.getHandler());250 channel.getHandler().channelError();251}252/**253 * Simulates the WebChannelBase firing the message event for the given channel.254 * @param {!goog.labs.net.webChannel.WebChannelBase} channel The WebChannelBase.255 * @param {String} data The message data.256 */257function simulateMessageEvent(channel, data) {258 assertNotNull(channel.getHandler());259 channel.getHandler().channelHandleArray(channel, data);...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var clientContext = new SP.ClientContext.get_current();2var oList = clientContext.get_web().get_lists().getByTitle('List1');3var camlQuery = new SP.CamlQuery();4camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'ID\'/><Value Type=\'Number\'>1</Value></Eq></Where></Query></View>');5this.collListItem = oList.getItems(camlQuery);6clientContext.load(collListItem);7clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));8function onQuerySucceeded(sender, args) {9 var listItemInfo = '';10 var listItemEnumerator = collListItem.getEnumerator();11 while (listItemEnumerator.moveNext()) {12 var oListItem = listItemEnumerator.get_current();13 listItemInfo += 'ID: ' + oListItem.get_id() + '\n';14 listItemInfo += 'Title: ' + oListItem.get_item('Title') + '\n';15 listItemInfo += 'Body: ' + oListItem.get_item('Body') + '\n';16 listItemInfo += 'Author: ' + oListItem.get_item('Author').get_lookupValue() + '\n';17 listItemInfo += 'Editor: ' + oListItem.get_item('Editor').get_lookupValue() + '\n';18 listItemInfo += 'Created: ' + oListItem.get_item('Created') + '\n';19 listItemInfo += 'Modified: ' + oListItem.get_item('Modified') + '\n';20 listItemInfo += 'Attachments: ' + oListItem.get_item('Attachments') + '\n';21 }22 alert(listItemInfo.toString());23}24function onQueryFailed(sender, args) {25 alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());26}27var clientContext = new SP.ClientContext.get_current();28var oWebsite = clientContext.get_site().get_rootWeb().get_webs().getByUrl('subsite');29var oList = oWebsite.get_lists().getByTitle('List1');30var camlQuery = new SP.CamlQuery();31camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name=\'ID\'/><Value Type=\'Number\'>1</

Full Screen

Using AI Code Generation

copy

Full Screen

1var clientContext = new SP.ClientContext.get_current();2var oWebsite = clientContext.get_web();3clientContext.load(oWebsite);4clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));5function onQuerySucceeded(sender, args) {6 alert('Web title: ' + oWebsite.get_title());7}8function onQueryFailed(sender, args) {9 alert('Request failed. ' + args.get_message() + '10' + args.get_stackTrace());11}12var clientContext = new SP.ClientContext.get_current();13var oWebsite = clientContext.get_web();14var web = oWebsite.get_webs().getByTitle('subweb');15clientContext.load(web);16clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));17function onQuerySucceeded(sender, args) {18 alert('Web title: ' + web.get_title());19}20function onQueryFailed(sender, args) {21 alert('Request failed. ' + args.get_message() + '22' + args.get_stackTrace());23}

Full Screen

Using AI Code Generation

copy

Full Screen

1var context = new SP.ClientContext.get_current();2var web = context.get_web();3context.load(web);4context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));5function onQuerySucceeded() {6 alert('Web title: ' + web.get_title());7}8function onQueryFailed(sender, args) {9 alert('Request failed. ' + args.get_message() + '10' + args.get_stackTrace());11}12public static string GetSiteUrl()13{14 return SPContext.Current.Site.Url;15}16public static string GetSiteUrl()17{18 return SPContext.Current.Site.Url;19}

Full Screen

Using AI Code Generation

copy

Full Screen

1var context = new SP.ClientContext.get_current();2var web = context.get_web();3var user = web.get_currentUser();4context.load(user);5context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));6function onQuerySucceeded(sender, args) {7 alert('Hello ' + user.get_title());8}9function onQueryFailed(sender, args) {10 alert('Request failed. ' + args.get_message() + '11' + args.get_stackTrace());12}13var context = new SP.ClientContext.get_current();14var web = context.get_web();15var subweb = web.get_webs().getByTitle("SubWeb");16var user = subweb.get_currentUser();17context.load(user);18context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));19function onQuerySucceeded(sender, args) {20 alert('Hello ' + user.get_title());21}22function onQueryFailed(sender, args) {23 alert('Request failed. ' + args.get_message() + '24' + args.get_stackTrace());25}26var context = new SP.ClientContext.get_current();27var web = context.get_web();28var subweb = web.get_webs().getByTitle("SubWeb");29var user = subweb.get_currentUser();30context.load(user);31context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));32function onQuerySucceeded(sender, args) {33 alert('Hello ' + user.get_title());34}35function onQueryFailed(sender, args) {36 alert('Request failed. ' + args.get_message() + '37' + args.get_stackTrace());38}39var context = new SP.ClientContext.get_current();40var web = context.get_web();41var subweb = web.get_webs().getByTitle("SubWeb");42var user = subweb.get_currentUser();43context.load(user);44context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));45function onQuerySucceeded(sender, args) {46 alert('Hello ' + user.get_title());47}48function onQueryFailed(sender, args) {49 alert('Request failed. ' + args.get_message() + '

Full Screen

Using AI Code Generation

copy

Full Screen

1var context = SP.ClientContext.get_current();2var web = context.get_web();3var url = web.get_serverRelativeUrl();4var webUrl = url + "/_api/web";5var webRequest = new SP.WebRequestInfo();6webRequest.set_url(webUrl);7webRequest.set_method("GET");8webRequest.set_headers({ "Accept": "application/json; odata=verbose" });9var webExecutor = new SP.WebRequestExecutor(webRequest);10webExecutor.executeAsync(11 Function.createDelegate(this, function (sender, args) {12 if (args.get_statusCode() == 200) {13 var jsonObject = JSON.parse(args.get_responseData());14 var webTitle = jsonObject.d.Title;15 console.log(webTitle);16 }17 })18);19var context = SP.ClientContext.get_current();20var web = context.get_web();21var url = web.get_serverRelativeUrl();22var webUrl = url + "/_api/site";23var webRequest = new SP.WebRequestInfo();24webRequest.set_url(webUrl);25webRequest.set_method("GET");26webRequest.set_headers({ "Accept": "application/json; odata=verbose" });27var webExecutor = new SP.WebRequestExecutor(webRequest);28webExecutor.executeAsync(29 Function.createDelegate(this, function (sender, args) {30 if (args.get_statusCode() == 200) {31 var jsonObject = JSON.parse(args.get_responseData());32 var webTitle = jsonObject.d.Title;33 console.log(webTitle);34 }35 })36);37var context = SP.ClientContext.get_current();38var web = context.get_web();39var url = web.get_serverRelativeUrl();40var webUrl = url + "/_api/site";41var webRequest = new SP.WebRequestInfo();42webRequest.set_url(webUrl);43webRequest.set_method("GET");44webRequest.set_headers({ "Accept": "application/json; odata=verbose" });45var webExecutor = new SP.WebRequestExecutor(webRequest);46webExecutor.executeAsync(47 Function.createDelegate(this, function (sender, args) {48 if (args.get_statusCode() == 200) {49 var jsonObject = JSON.parse(args.get_responseData());50 var webTitle = jsonObject.d.Title;51 console.log(webTitle);52 }53 })54);55var context = SP.ClientContext.get_current();

Full Screen

Using AI Code Generation

copy

Full Screen

1var web = context.get_web();2var oList = web.get_lists().getByTitle('My List');3context.load(oList);4context.executeQueryAsync(function () {5 console.log(oList.get_title());6}, function (sender, args) {7 console.log(args.get_message());8});9var web = context.get_web();10var oList = web.get_lists().getByTitle('My List');11context.load(oList);12context.executeQueryAsync(function () {13 console.log(oList.get_title());14}, function (sender, args) {15 console.log(args.get_message());16});17var web = context.get_web();18var oList = web.get_lists().getByTitle('My List');19context.load(oList);20context.executeQueryAsync(function () {21 console.log(oList.get_title());22}, function (sender, args) {23 console.log(args.get_message());24});25var web = context.get_web();26var oList = web.get_lists().getByTitle('My List');27context.load(oList);28context.executeQueryAsync(function () {29 console.log(oList.get_title());30}, function (sender, args) {31 console.log(args.get_message());32});33var web = context.get_web();34var oList = web.get_lists().getByTitle('My List');35context.load(oList);36context.executeQueryAsync(function () {37 console.log(oList.get_title());38}, function (sender, args) {39 console.log(args.get_message());40});41var web = context.get_web();42var oList = web.get_lists().getByTitle('My List');43context.load(oList);44context.executeQueryAsync(function () {45 console.log(oList.get_title());46}, function (sender, args) {47 console.log(args.get_message());48});49var web = context.get_web();50var oList = web.get_lists().getByTitle('My List');51context.load(oList);52context.executeQueryAsync(function () {53 console.log(oList.get_title());54}, function (sender, args) {55 console.log(args.get_message());56});57var web = context.get_web();58var oList = web.get_lists().getByTitle('My List');59context.load(oList);

Full Screen

Using AI Code Generation

copy

Full Screen

1var list = web.Lists.GetByTitle("MyList");2var item = list.GetItemById(1);3var field = item.get_fieldValues().Title;4var list = web.Lists.GetByTitle("MyList");5var item = list.GetItemById(1);6var field = item.get_fieldValues().Title;7var list = web.Lists.GetByTitle("MyList");8var item = list.GetItemById(1);9var field = item.get_fieldValues().Title;10var list = web.Lists.GetByTitle("MyList");11var item = list.GetItemById(1);12var field = item.get_fieldValues().Title;13var web = new Web();14var list = web.Lists.GetByTitle("MyList");15var item = list.GetItemById(1);16var field = item.get_fieldValues().Title;17var web = new Web();18var list = web.Lists.GetByTitle("MyList");19var item = list.GetItemById(1);20var field = item.get_fieldValues().Title;21var web = new Web();

Full Screen

Using AI Code Generation

copy

Full Screen

1var context = SP.ClientContext.get_current();2var web = context.get_web();3var request = new SP.WebRequestInfo();4request.set_method("POST");5request.set_body("This is the request body");6var executor = new SP.WebRequestExecutor();7executor.executeAsync(request, function (result) {8 if (result.get_statusCode() === 200) {9 var response = result.get_responseData();10 console.log(response);11 }12 else {13 console.log("Error: " + result.get_statusCode());14 }15});16var context = SP.ClientContext.get_current();17var list = context.get_web().get_lists().getByTitle("ListName");18var request = new SP.WebRequestInfo();19request.set_method("POST");20request.set_body("This is the request body");21var executor = new SP.WebRequestExecutor();22executor.executeAsync(request, list, function (result) {23 if (result.get_statusCode() === 200) {24 var response = result.get_responseData();25 console.log(response);26 }27 else {28 console.log("Error: " + result.get_statusCode());29 }30});31var context = SP.ClientContext.get_current();32var list = context.get_web().get_lists().getByTitle("ListName");33var item = list.getItemById(1);34var request = new SP.WebRequestInfo();35request.set_method("POST");

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run root automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful