@@ -852,14 +852,14 @@ function preLoadCss(cssUrl) {
852852 window . CURRENT_TOOLTIP_ELEMENT = wrapper ;
853853 window . CURRENT_TOOLTIP_ELEMENT . TOOLTIP_BASE = e ;
854854 clearTooltipHoverTimeout ( window . CURRENT_TOOLTIP_ELEMENT ) ;
855- wrapper . onpointerenter = function ( ev ) {
855+ wrapper . onpointerenter = ev => {
856856 // If this is a synthetic touch event, ignore it. A click event will be along shortly.
857857 if ( ev . pointerType !== "mouse" ) {
858858 return ;
859859 }
860860 clearTooltipHoverTimeout ( e ) ;
861861 } ;
862- wrapper . onpointerleave = function ( ev ) {
862+ wrapper . onpointerleave = ev => {
863863 // If this is a synthetic touch event, ignore it. A click event will be along shortly.
864864 if ( ev . pointerType !== "mouse" ) {
865865 return ;
@@ -963,38 +963,38 @@ function preLoadCss(cssUrl) {
963963 }
964964
965965 onEachLazy ( document . getElementsByClassName ( "tooltip" ) , e => {
966- e . onclick = function ( ) {
967- this . TOOLTIP_FORCE_VISIBLE = this . TOOLTIP_FORCE_VISIBLE ? false : true ;
968- if ( window . CURRENT_TOOLTIP_ELEMENT && ! this . TOOLTIP_FORCE_VISIBLE ) {
966+ e . onclick = ( ) => {
967+ e . TOOLTIP_FORCE_VISIBLE = e . TOOLTIP_FORCE_VISIBLE ? false : true ;
968+ if ( window . CURRENT_TOOLTIP_ELEMENT && ! e . TOOLTIP_FORCE_VISIBLE ) {
969969 hideTooltip ( true ) ;
970970 } else {
971- showTooltip ( this ) ;
971+ showTooltip ( e ) ;
972972 window . CURRENT_TOOLTIP_ELEMENT . setAttribute ( "tabindex" , "0" ) ;
973973 window . CURRENT_TOOLTIP_ELEMENT . focus ( ) ;
974974 window . CURRENT_TOOLTIP_ELEMENT . onblur = tooltipBlurHandler ;
975975 }
976976 return false ;
977977 } ;
978- e . onpointerenter = function ( ev ) {
978+ e . onpointerenter = ev => {
979979 // If this is a synthetic touch event, ignore it. A click event will be along shortly.
980980 if ( ev . pointerType !== "mouse" ) {
981981 return ;
982982 }
983- setTooltipHoverTimeout ( this , true ) ;
983+ setTooltipHoverTimeout ( e , true ) ;
984984 } ;
985- e . onpointermove = function ( ev ) {
985+ e . onpointermove = ev => {
986986 // If this is a synthetic touch event, ignore it. A click event will be along shortly.
987987 if ( ev . pointerType !== "mouse" ) {
988988 return ;
989989 }
990- setTooltipHoverTimeout ( this , true ) ;
990+ setTooltipHoverTimeout ( e , true ) ;
991991 } ;
992- e . onpointerleave = function ( ev ) {
992+ e . onpointerleave = ev => {
993993 // If this is a synthetic touch event, ignore it. A click event will be along shortly.
994994 if ( ev . pointerType !== "mouse" ) {
995995 return ;
996996 }
997- if ( ! this . TOOLTIP_FORCE_VISIBLE &&
997+ if ( ! e . TOOLTIP_FORCE_VISIBLE &&
998998 ! elemIsInParent ( ev . relatedTarget , window . CURRENT_TOOLTIP_ELEMENT ) ) {
999999 // Tooltip pointer leave gesture:
10001000 //
@@ -1139,7 +1139,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
11391139 *
11401140 * Pass "true" to reset focus for tooltip popovers.
11411141 */
1142- window . hideAllModals = function ( switchFocus ) {
1142+ window . hideAllModals = switchFocus => {
11431143 hideSidebar ( ) ;
11441144 window . hidePopoverMenus ( ) ;
11451145 hideTooltip ( switchFocus ) ;
@@ -1148,7 +1148,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
11481148 /**
11491149 * Hide all the popover menus.
11501150 */
1151- window . hidePopoverMenus = function ( ) {
1151+ window . hidePopoverMenus = ( ) => {
11521152 onEachLazy ( document . querySelectorAll ( ".search-form .popover" ) , elem => {
11531153 elem . style . display = "none" ;
11541154 } ) ;
0 commit comments