@@ -247,7 +247,7 @@ function highlight(root, activeNode, nodes)
247
247
{
248
248
resetHighlightedNodes(root);
249
249
250
- (nodes||[]).forEach(function (node) {
250
+ Array.from (nodes||[]).forEach(function (node) {
251
251
if (!/\bsf-dump-highlight\b/.test(node.className)) {
252
252
node.className = node.className + ' sf-dump-highlight';
253
253
}
@@ -260,7 +260,7 @@ function highlight(root, activeNode, nodes)
260
260
261
261
function resetHighlightedNodes(root)
262
262
{
263
- root.querySelectorAll('.sf-dump-str, .sf-dump-key, .sf-dump-public, .sf-dump-protected, .sf-dump-private').forEach(function (strNode) {
263
+ Array.from( root.querySelectorAll('.sf-dump-str, .sf-dump-key, .sf-dump-public, .sf-dump-protected, .sf-dump-private') ).forEach(function (strNode) {
264
264
strNode.className = strNode.className.replace(/\b sf-dump-highlight\b/, '');
265
265
strNode.className = strNode.className.replace(/\b sf-dump-highlight-active\b/, '');
266
266
});
@@ -456,7 +456,7 @@ function isCtrlKey(e) {
456
456
counter.textContent = (state.isEmpty() ? 0 : state.idx + 1) + ' on ' + state.count();
457
457
}, 400);
458
458
});
459
- search.querySelectorAll('.sf-dump-search-input-next, .sf-dump-search-input-previous').forEach(function (btn) {
459
+ Array.from( search.querySelectorAll('.sf-dump-search-input-next, .sf-dump-search-input-previous') ).forEach(function (btn) {
460
460
addEventListener(btn, 'click', function (e) {
461
461
e.preventDefault();
462
462
var direction = -1 !== e.target.className.indexOf('next') ? 'next' : 'previous';
0 commit comments