Skip to content

Commit 21f1174

Browse files
committed
more style fixes
1 parent ea0ed1c commit 21f1174

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

packages/javascript-kernel/src/executor.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ export class JavaScriptExecutor {
695695
};
696696
} catch {
697697
// Try to provide info even if we can't evaluate
698-
return this._inspectBuiltin(expression, detailLevel);
698+
return this.inspectBuiltin(expression, detailLevel);
699699
}
700700
}
701701

@@ -707,7 +707,7 @@ export class JavaScriptExecutor {
707707
* @param detailLevel - The level of detail requested.
708708
* @returns The inspection result.
709709
*/
710-
protected _inspectBuiltin(
710+
protected inspectBuiltin(
711711
expression: string,
712712
detailLevel: number
713713
): IInspectResult {
@@ -718,7 +718,7 @@ export class JavaScriptExecutor {
718718
}
719719

720720
// Fall back to predefined documentation
721-
const doc = this._getBuiltinDocumentation(expression);
721+
const doc = this.getBuiltinDocumentation(expression);
722722
if (doc) {
723723
return {
724724
found: true,
@@ -757,7 +757,7 @@ export class JavaScriptExecutor {
757757
* @param expression - The expression to get documentation for.
758758
* @returns The documentation string, or null if not found.
759759
*/
760-
protected _getBuiltinDocumentation(expression: string): string | null {
760+
protected getBuiltinDocumentation(expression: string): string | null {
761761
// Common JavaScript built-ins documentation
762762
const builtins: Record<string, string> = {
763763
console:
@@ -1544,7 +1544,7 @@ export class JavaScriptExecutor {
15441544
);
15451545

15461546
// Add predefined documentation if available
1547-
const doc = this._getBuiltinDocumentation(expression);
1547+
const doc = this.getBuiltinDocumentation(expression);
15481548
if (doc) {
15491549
const mdContent = inspectionData['text/markdown'] || '';
15501550
inspectionData['text/markdown'] = mdContent + `\n\n---\n\n${doc}`;

packages/javascript-kernel/src/kernel.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)