Accept null or something as the options

This commit is contained in:
YUKI Hiroshi 2016-07-12 09:58:05 +09:00
parent 2452641711
commit 6f658d4eef

View File

@ -1307,11 +1307,13 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
/* notify "ready to open child tab(s)" */
readyToOpenChildTab : function TSTBase_readyToOpenChildTab(aTabOrSomething, aMultiple, aOptions = {}) /* PUBLIC API */
readyToOpenChildTab : function TSTBase_readyToOpenChildTab(aTabOrSomething, aMultiple, aOptions) /* PUBLIC API */
{
if (!utils.getTreePref('autoAttach'))
return false;
if (!aOptions)
aOptions = {};
if (aOptions instanceof Ci.nsIDOMElement) // for backward compatibility
aOptions = { insertBefore : aOptions };