Compare commits

...

3 Commits

Author SHA1 Message Date
Joe Cheng
e4b5997c86 Build dist 2017-10-25 15:58:17 -07:00
Philipp A
7532ca53d9 Load scripts synchronously 2017-10-20 08:31:22 +02:00
Philipp A
80f8bf440e Avoid jQuery using eval() for dependency JS
This allows to use debuggers for dependency code.
2017-10-17 10:39:22 +00:00
5 changed files with 16 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
var exports = window.Shiny = window.Shiny || {};
exports.version = "1.0.5.9000"; // Version number inserted by Grunt
exports.version = "{{ VERSION }}"; // Version number inserted by Grunt
var origPushState = window.history.pushState;
window.history.pushState = function () {
@@ -3957,7 +3957,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
var scripts = $.map(asArray(dep.script), function (scriptName) {
return $("<script>").attr("src", href + "/" + encodeURI(scriptName));
});
$head.append(scripts);
// avoid jQuerys magic eval()
scripts.forEach(function (e) {
e[0].async = false;
document.head.appendChild(e[0]);
});
}
if (dep.attachment) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -103,7 +103,11 @@ function renderDependency(dep) {
var scripts = $.map(asArray(dep.script), function(scriptName) {
return $("<script>").attr("src", href + "/" + encodeURI(scriptName));
});
$head.append(scripts);
// avoid jQuerys magic eval()
scripts.forEach(function(e) {
e[0].async = false;
document.head.appendChild(e[0]);
});
}
if (dep.attachment) {