MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / initLoadSaver

Method initLoadSaver

static/panes/editor.ts:1858–1873  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1856 }
1857
1858 initLoadSaver(): void {
1859 this.loadSaveButton.off('click').on('click', () => {
1860 if (this.currentLanguage) {
1861 loadSave.run(
1862 (text, filename) => {
1863 this.setSource(text);
1864 this.setFilename(filename);
1865 this.updateState();
1866 this.maybeEmitChange(true);
1867 },
1868 this.getSource(),
1869 this.currentLanguage,
1870 );
1871 }
1872 });
1873 }
1874
1875 onLanguageChange(newLangId: LanguageKey, firstTime?: boolean): void {
1876 const languages = languagesService.getLanguagesOrFail();

Callers 2

registerButtonsMethod · 0.95
onLanguageChangeMethod · 0.95

Calls 8

setSourceMethod · 0.95
setFilenameMethod · 0.95
updateStateMethod · 0.95
maybeEmitChangeMethod · 0.95
getSourceMethod · 0.95
offMethod · 0.80
onMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected