Archived
0

небольшие корректировки в javascript

This commit is contained in:
2017-05-04 12:48:08 +03:00
parent 5c8cd7e857
commit d6a9775103
5 changed files with 56 additions and 59 deletions

View File

@@ -1,6 +1,25 @@
const ce = React.createElement;
const nbsp = '\u00a0';
// -- Functions -- //
function loadScript(url, fnLoad, fnError) {
const script = document.createElement("script");
script.src = url;
script.onload = fnLoad;
script.onerror = fnError;
document.body.appendChild(script);
}
function loadStyle(url, fnLoad, fnError) {
const style = document.createElement("link");
style.rel = "stylesheet";
style.href = url;
style.onload = fnLoad;
style.onerror = fnError;
document.body.appendChild(style);
}
// -- Bootstrap -- //
var MainMenuItem = React.createClass({