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:
piro 2008-07-18 00:19:24 +00:00
parent db094717ff
commit 62bb44fc02
3 changed files with 5 additions and 5 deletions

View File

@ -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' ;

View File

@ -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;
},

View File

@ -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':