@@ -20,7 +20,7 @@ export class JavaScriptKernel extends BaseKernel implements IKernel {
2020 */
2121 constructor ( options : JavaScriptKernel . IOptions ) {
2222 super ( options ) ;
23- this . _initIFrame ( ) ;
23+ this . initIFrame ( ) ;
2424 }
2525
2626 /**
@@ -30,7 +30,7 @@ export class JavaScriptKernel extends BaseKernel implements IKernel {
3030 if ( this . isDisposed ) {
3131 return ;
3232 }
33- this . _cleanupIFrame ( ) ;
33+ this . cleanupIFrame ( ) ;
3434 super . dispose ( ) ;
3535 }
3636
@@ -306,14 +306,14 @@ export class JavaScriptKernel extends BaseKernel implements IKernel {
306306 *
307307 * @param code - The code to execute.
308308 */
309- protected _eval ( code : string ) : any {
309+ protected evaluate ( code : string ) : any {
310310 return this . _evalCodeFunc ( this . _iframe . contentWindow , code ) ;
311311 }
312312
313313 /**
314314 * Initialize the IFrame and set up communication.
315315 */
316- protected async _initIFrame ( ) : Promise < void > {
316+ protected async initIFrame ( ) : Promise < void > {
317317 this . _container = document . createElement ( 'div' ) ;
318318 this . _container . style . cssText =
319319 'position:absolute;width:0;height:0;overflow:hidden;' ;
@@ -341,20 +341,20 @@ export class JavaScriptKernel extends BaseKernel implements IKernel {
341341 } ) ;
342342
343343 // Set up console overrides in the iframe
344- this . _setupConsoleOverrides ( ) ;
344+ this . setupConsoleOverrides ( ) ;
345345
346346 // Set up message handling for console output
347347 this . _messageHandler = ( event : MessageEvent ) => {
348348 if ( event . source === this . _iframe . contentWindow ) {
349- this . _processMessage ( event . data ) ;
349+ this . processMessage ( event . data ) ;
350350 }
351351 } ;
352352 window . addEventListener ( 'message' , this . _messageHandler ) ;
353353
354354 // Initialize the executor with the iframe's window
355355 if ( this . _iframe . contentWindow ) {
356356 this . _executor = new JavaScriptExecutor ( this . _iframe . contentWindow ) ;
357- this . _setupDisplay ( ) ;
357+ this . setupDisplay ( ) ;
358358 }
359359
360360 this . _ready . resolve ( ) ;
@@ -363,7 +363,7 @@ export class JavaScriptKernel extends BaseKernel implements IKernel {
363363 /**
364364 * Set up the display() function in the iframe.
365365 */
366- protected _setupDisplay ( ) : void {
366+ protected setupDisplay ( ) : void {
367367 if ( ! this . _iframe . contentWindow || ! this . _executor ) {
368368 return ;
369369 }
@@ -387,7 +387,7 @@ export class JavaScriptKernel extends BaseKernel implements IKernel {
387387 /**
388388 * Set up console overrides in the iframe to bubble output to parent.
389389 */
390- protected _setupConsoleOverrides ( ) : void {
390+ protected setupConsoleOverrides ( ) : void {
391391 if ( ! this . _iframe . contentWindow ) {
392392 return ;
393393 }
@@ -426,7 +426,7 @@ export class JavaScriptKernel extends BaseKernel implements IKernel {
426426 /**
427427 * Clean up the iframe resources.
428428 */
429- protected _cleanupIFrame ( ) : void {
429+ protected cleanupIFrame ( ) : void {
430430 if ( this . _messageHandler ) {
431431 window . removeEventListener ( 'message' , this . _messageHandler ) ;
432432 this . _messageHandler = null ;
@@ -443,7 +443,7 @@ export class JavaScriptKernel extends BaseKernel implements IKernel {
443443 *
444444 * @param msg - The message to process.
445445 */
446- protected _processMessage ( msg : any ) : void {
446+ protected processMessage ( msg : any ) : void {
447447 if ( ! msg || ! msg . type ) {
448448 return ;
449449 }
0 commit comments