B2G/gecko/browser/base/content/newtab/page.js
/**
   * Updates the 'page-disabled' attributes of the respective DOM nodes.
   * @param aValue Whether the New Tab Page is enabled or not.
   */
Updates the 'page-disabled' attributes of the respective DOM nodes.
@param aValue Whether the New Tab Page is enabled or not.
Updates the ' page - disabled ' attributes of the respective DOM nodes . @param aValue Whether the New Tab Page is enabled or not .
function Page_updateAttributes(aValue) {
    let nodeSelector = "#newtab-scrollbox, #newtab-toggle, #newtab-grid";
    for (let node of document.querySelectorAll(nodeSelector)) {
      if (aValue)
        node.removeAttribute("page-disabled");
      else
        node.setAttribute("page-disabled", "true");
    }
    let inputSelector = ".newtab-control, .newtab-link";
    for (let input of document.querySelectorAll(inputSelector)) {
      if (aValue) 
        input.removeAttribute("tabindex");
      else
        input.setAttribute("tabindex", "-1");
    }
    let toggle = document.getElementById("newtab-toggle");
    toggle.setAttribute("title", newTabString(aValue ? "hide" : "show"));
  }
function Page_updateAttributes ( aValue ) { let nodeSelector = "#newtab-scrollbox, #newtab-toggle, #newtab-grid" ; for ( let node of document . querySelectorAll ( nodeSelector ) ) { if ( aValue ) node . removeAttribute ( "page-disabled" ) ; else node . setAttribute ( "page-disabled" , "true" ) ; } let inputSelector = ".newtab-control, .newtab-link" ; for ( let input of document . querySelectorAll ( inputSelector ) ) { if ( aValue ) input . removeAttribute ( "tabindex" ) ; else input . setAttribute ( "tabindex" , "-1" ) ; } let toggle = document . getElementById ( "newtab-toggle" ) ; toggle . setAttribute ( "title" , newTabString ( aValue ? "hide" : "show" ) ) ; }
Updates the 'page-disabled' attributes of the respective DOM nodes.
Updates the ' page - disabled ' attributes of the respective DOM nodes .
// Set the nodes' states. // Enables/disables the control and link elements. // Update the toggle button's title.