better fix for Array.slice on ie8
This commit is contained in:
parent
5689573170
commit
498af4aab8
2 changed files with 4 additions and 9 deletions
|
|
@ -161,12 +161,7 @@ function highlight() {
|
|||
var highlighter = ace.require("ace/ext/static_highlight")
|
||||
var dom = ace.require("ace/lib/dom")
|
||||
function qsa(sel) {
|
||||
var items = document.querySelectorAll(sel);
|
||||
var result = [];
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
result.push(items[i]);
|
||||
}
|
||||
return result;
|
||||
return Array.apply(null, document.querySelectorAll(sel));
|
||||
}
|
||||
|
||||
qsa("code[class]").forEach(function(el) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue