diff --git a/benchmark.js b/benchmark.js index 803811ea..c22c0502 100644 --- a/benchmark.js +++ b/benchmark.js @@ -660,7 +660,9 @@ function runScript(code) { var anchor = freeDefine ? define.amd : Benchmark, script = doc.createElement('script'), - sibling = doc.getElementsByTagName('script')[0], + sibling = doc.getElementsByTagName('script')[0] || + doc.body.children[doc.body.children.length - 1] || // Last Element Node in OR + doc.body.appendChild(doc.createElement('script')), // Create element to insert next to parent = sibling.parentNode, prop = uid + 'runScript', prefix = '(' + (freeDefine ? 'define.amd.' : 'Benchmark.') + prop + '||function(){})();'; diff --git a/package.json b/package.json index c8a2c93c..3aed7215 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "benchmark", - "version": "2.1.1", + "version": "2.1.0", "description": "A benchmarking library that supports high-resolution timers & returns statistically significant results.", "homepage": "https://benchmarkjs.com/", "license": "MIT", @@ -14,19 +14,19 @@ ], "repository": "bestiejs/benchmark.js", "scripts": { - "doc": "docdown benchmark.js doc/README.md style=github title=\"Benchmark.js v${npm_package_version}\" toc=categories url=https://github.com/bestiejs/benchmark.js/blob/${npm_package_version}/benchmark.js", + "doc": "docdown benchmark.js doc/README.md toc='categories' url=\"https://github.com/bestiejs/benchmark.js/blob/${npm_package_version}/benchmark.js\" title=\"Benchmark.js v${npm_package_version}\" hash='github'", "test": "node test/test" }, "dependencies": { - "lodash": "^4.14.2", + "lodash": "^4.13.1", "platform": "^1.3.1" }, "devDependencies": { - "coveralls": "^2.11.12", - "docdown": "~0.7.1", + "coveralls": "^2.11.9", + "docdown": "~0.5.1", "istanbul": "0.4.4", - "qunit-extras": "^2.1.0", - "qunitjs": "^2.0.1", + "qunit-extras": "^2.0.1", + "qunitjs": "^2.0.0", "requirejs": "^2.2.0" }, "files": [