MCPcopy Create free account
hub / github.com/aosabook/500lines / loadFile

Function loadFile

blockcode/code/file.js:61–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59 }
60
61 function loadFile(){
62 var input = elem('input', {'type': 'file', 'accept': 'application/json'});
63 if (!input){ return; }
64 input.addEventListener('change', function(evt){ readFile(input.files[0]); });
65 input.click();
66 }
67
68 function loadExample(evt){
69 var exampleName = evt.target.value;

Callers

nothing calls this directly

Calls 1

readFileFunction · 0.85

Tested by

no test coverage detected