Difference between revisions of "Active Element Favlet"

From Level Access Web Labs
Jump to navigation Jump to search
(Add instructions on how to "install" the Favlet)
(Add link to "Install a Favlet")
Line 1: Line 1:
IE or Firefox: Right click or press the applications key on the Favlet link.  Choose Add to Favorites, Add to Bookmarks or Bookmark this Link to add this Favlet to your Favorites or Bookmarks.
 
 
Chrome or Safari: drag the Favlet link to your browser's bookmarks bar.
 
 
 
Sometimes there is no visible keyboard focus on an element and you want to know what element has keyboard focus.  This Favlet will display the outer HTML code of the active element.  If frames are used this will show the current frame -- the Favlet could be updated to drill down through the frames to the active element of the current frame.
 
Sometimes there is no visible keyboard focus on an element and you want to know what element has keyboard focus.  This Favlet will display the outer HTML code of the active element.  If frames are used this will show the current frame -- the Favlet could be updated to drill down through the frames to the active element of the current frame.
  
Line 8: Line 4:
 
<a href="javascript:(function() { alert(document.activeElement.outerHTML);})();"> Display the active element's outer HTML code Favlet </a>
 
<a href="javascript:(function() { alert(document.activeElement.outerHTML);})();"> Display the active element's outer HTML code Favlet </a>
 
</html>
 
</html>
 +
 +
(See [[Install a Favlet]] for instructions on how to add this Favlet to your browser).
  
 
Sample code:
 
Sample code:

Revision as of 21:53, 6 November 2018

Sometimes there is no visible keyboard focus on an element and you want to know what element has keyboard focus. This Favlet will display the outer HTML code of the active element. If frames are used this will show the current frame -- the Favlet could be updated to drill down through the frames to the active element of the current frame.

Display the active element's outer HTML code Favlet

(See Install a Favlet for instructions on how to add this Favlet to your browser).

Sample code: javascript:(function() { alert(document.activeElement.outerHTML);})();