Server IP : 162.214.80.37 / Your IP : 216.73.216.83 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home2/imyrqtmy/public_html/opulanceindia/admin/plugins/codemirror/addon/tern/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE // declare global: tern, server var server; this.onmessage = function(e) { var data = e.data; switch (data.type) { case "init": return startServer(data.defs, data.plugins, data.scripts); case "add": return server.addFile(data.name, data.text); case "del": return server.delFile(data.name); case "req": return server.request(data.body, function(err, reqData) { postMessage({id: data.id, body: reqData, err: err && String(err)}); }); case "getFile": var c = pending[data.id]; delete pending[data.id]; return c(data.err, data.text); default: throw new Error("Unknown message type: " + data.type); } }; var nextId = 0, pending = {}; function getFile(file, c) { postMessage({type: "getFile", name: file, id: ++nextId}); pending[nextId] = c; } function startServer(defs, plugins, scripts) { if (scripts) importScripts.apply(null, scripts); server = new tern.Server({ getFile: getFile, async: true, defs: defs, plugins: plugins }); } this.console = { log: function(v) { postMessage({type: "debug", message: v}); } };