@@ -305,10 +305,25 @@ var WebGLRenderer = new Class({
305305 */
306306 this . scissorStack = [ ] ;
307307
308+ /**
309+ * The handler to invoke when the context is lost.
310+ * This should not be changed and is set in the boot method.
311+ *
312+ * @name Phaser.Renderer.WebGL.WebGLRenderer#contextLostHandler
313+ * @type {function }
314+ * @since 3.19.0
315+ */
308316 this . contextLostHandler = NOOP ;
309- this . contextRestoredHandler = NOOP ;
310317
311- // These are initialized post context creation
318+ /**
319+ * The handler to invoke when the context is restored.
320+ * This should not be changed and is set in the boot method.
321+ *
322+ * @name Phaser.Renderer.WebGL.WebGLRenderer#contextRestoredHandler
323+ * @type {function }
324+ * @since 3.19.0
325+ */
326+ this . contextRestoredHandler = NOOP ;
312327
313328 /**
314329 * The underlying WebGL context of the renderer.
@@ -552,8 +567,6 @@ var WebGLRenderer = new Class({
552567
553568 this . contextLostHandler = function ( event )
554569 {
555- console . log ( 'ctx lost handler' ) ;
556-
557570 _this . contextLost = true ;
558571
559572 _this . game . events . emit ( GameEvents . CONTEXT_LOST , _this ) ;
@@ -771,42 +784,6 @@ var WebGLRenderer = new Class({
771784 return this ;
772785 } ,
773786
774- /**
775- * Adds a callback to be invoked when the WebGL context has been restored by the browser.
776- *
777- * @method Phaser.Renderer.WebGL.WebGLRenderer#onContextRestored
778- * @since 3.0.0
779- *
780- * @param {WebGLContextCallback } callback - The callback to be invoked on context restoration.
781- * @param {object } target - The context of the callback.
782- *
783- * @return {this } This WebGLRenderer instance.
784- */
785- onContextRestored : function ( callback , target )
786- {
787- this . restoredContextCallbacks . push ( [ callback , target ] ) ;
788-
789- return this ;
790- } ,
791-
792- /**
793- * Adds a callback to be invoked when the WebGL context has been lost by the browser.
794- *
795- * @method Phaser.Renderer.WebGL.WebGLRenderer#onContextLost
796- * @since 3.0.0
797- *
798- * @param {WebGLContextCallback } callback - The callback to be invoked on context loss.
799- * @param {object } target - The context of the callback.
800- *
801- * @return {this } This WebGLRenderer instance.
802- */
803- onContextLost : function ( callback , target )
804- {
805- this . lostContextCallbacks . push ( [ callback , target ] ) ;
806-
807- return this ;
808- } ,
809-
810787 /**
811788 * Checks if a WebGL extension is supported
812789 *
0 commit comments