Array.prorotype.slice.call => Array.slice (for Fx 2 or later)
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@2874 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
db094717ff
commit
62bb44fc02
@ -124,7 +124,7 @@ function updateAutoHideModeLabel()
|
||||
var mode = gAutoHideModeRadio.value;
|
||||
var nodes = document.getElementsByAttribute('label-mode'+mode, '*');
|
||||
if (nodes && nodes.length)
|
||||
Array.prototype.slice.call(nodes).forEach(function(aNode) {
|
||||
Array.slice(nodes).forEach(function(aNode) {
|
||||
var label = aNode.getAttribute('label-mode'+mode);
|
||||
var node = document.getElementById(aNode.getAttribute('target'));
|
||||
var attr = node.localName == 'label' ? 'value' : 'label' ;
|
||||
|
@ -137,8 +137,8 @@ window.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
get browsers()
|
||||
{
|
||||
browsers = [].concat(Array.prototype.slice.call(document.getElementsByTagName('tabbrowser')))
|
||||
.concat(Array.prototype.slice.call(document.getElementsByTagName('browser')));
|
||||
browsers = [].concat(Array.slice(document.getElementsByTagName('tabbrowser')))
|
||||
.concat(Array.slice(document.getElementsByTagName('browser')));
|
||||
if ('SplitBrowser' in window) browsers = browsers.concat(SplitBrowser.browsers);
|
||||
return browsers;
|
||||
},
|
||||
|
@ -593,7 +593,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
window.setTimeout(function(aSelf) {
|
||||
var b = aSelf.mTabBrowser;
|
||||
if (aAll) {
|
||||
Array.prototype.slice.call(b.mTabContainer.childNodes).forEach(function(aTab) {
|
||||
Array.slice(b.mTabContainer.childNodes).forEach(function(aTab) {
|
||||
aSelf.initTabContentsOrder(aTab);
|
||||
});
|
||||
}
|
||||
@ -849,7 +849,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
case 'nsPref:changed':
|
||||
var value = this.getPref(aData);
|
||||
var tabContainer = b.mTabContainer;
|
||||
var tabs = Array.prototype.slice.call(tabContainer.childNodes);
|
||||
var tabs = Array.slice(tabContainer.childNodes);
|
||||
switch (aData)
|
||||
{
|
||||
case 'extensions.treestyletab.tabbar.position':
|
||||
|
Loading…
x
Reference in New Issue
Block a user