function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SF DEVSF DEV 

How to close firefox current parent tab on clicking commandbutton using javascript

Unable to close firefox current tab using javascript

using Window.top.close(), workinginchrome and IE not in firefox.
Is there way to close tab in forefox usingjavascript?
<apex:commandButton onClick="window.top.close();"   value="Cancel"/>
                
pconpcon
It seems that the Fireforx API for this is just window.close();

https://developer.mozilla.org/en-US/docs/Web/API/Window/close