src/Core/file.js
function caml_open_sync_raw(fileName, onSuccess, onFailure) {
    var f = caml_js_from_string(fileName);
    var data = new joo_global_object.Uint8Array([17, 211, 2]);

    var result = null;

    function onSuccess () {
        var res = new joo_global_object.Uint8Array(oReq.response);
        var ba = caml_ba_create_from(res, null, 0, 0, 0, [res.length])
        onSuccess(ba);
    };

    function onFailure () {
        onFailure(caml_js_to_string("failed to load file: " + f));   
    };

    var oReq = new XMLHttpRequest();
    oReq.addEventListener("load", onSuccess, onFailure);
    oReq.responseType = "arraybuffer"
    oReq.open("GET", fileName, true);
    oReq.send();
}
function caml_open_sync_raw(fileName, onSuccess, onFailure) {
    var f = caml_js_from_string(fileName);
    var data = new joo_global_object.Uint8Array([17, 211, 2]);

    var result = null;

    function onSuccess () {
        var res = new joo_global_object.Uint8Array(oReq.response);
        var ba = caml_ba_create_from(res, null, 0, 0, 0, [res.length])
        onSuccess(ba);
    };

    function onFailure () {
        onFailure(caml_js_to_string("failed to load file: " + f));   
    };

    var oReq = new XMLHttpRequest();
    oReq.addEventListener("load", onSuccess, onFailure);
    oReq.responseType = "arraybuffer"
    oReq.open("GET", fileName, true);
    oReq.send();
}
function caml_open_sync_raw ( fileName , onSuccess , onFailure ) { var f = caml_js_from_string ( fileName ) ; var data = new joo_global_object . Uint8Array ( [ 17 , 211 , 2 ] ) ; var result = null ; function onSuccess ( ) { var res = new joo_global_object . Uint8Array ( oReq . response ) ; var ba = caml_ba_create_from ( res , null , 0 , 0 , 0 , [ res . length ] ) onSuccess ( ba ) ; } ; function onFailure ( ) { onFailure ( caml_js_to_string ( "failed to load file: " + f ) ) ; } ; var oReq = new XMLHttpRequest ( ) ; oReq . addEventListener ( "load" , onSuccess , onFailure ) ; oReq . responseType = "arraybuffer" oReq . open ( "GET" , fileName , true ) ; oReq . send ( ) ; }
Provides: caml_open_sync_raw Requires: caml_ba_create_from, caml_js_from_string, caml_js_to_string
Provides : caml_open_sync_raw Requires : caml_ba_create_from caml_js_from_string caml_js_to_string