@@ -852,14 +852,14 @@ function preLoadCss(cssUrl) {
852
852
window . CURRENT_TOOLTIP_ELEMENT = wrapper ;
853
853
window . CURRENT_TOOLTIP_ELEMENT . TOOLTIP_BASE = e ;
854
854
clearTooltipHoverTimeout ( window . CURRENT_TOOLTIP_ELEMENT ) ;
855
- wrapper . onpointerenter = function ( ev ) {
855
+ wrapper . onpointerenter = ev => {
856
856
// If this is a synthetic touch event, ignore it. A click event will be along shortly.
857
857
if ( ev . pointerType !== "mouse" ) {
858
858
return ;
859
859
}
860
860
clearTooltipHoverTimeout ( e ) ;
861
861
} ;
862
- wrapper . onpointerleave = function ( ev ) {
862
+ wrapper . onpointerleave = ev => {
863
863
// If this is a synthetic touch event, ignore it. A click event will be along shortly.
864
864
if ( ev . pointerType !== "mouse" ) {
865
865
return ;
@@ -963,38 +963,38 @@ function preLoadCss(cssUrl) {
963
963
}
964
964
965
965
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 ) {
969
969
hideTooltip ( true ) ;
970
970
} else {
971
- showTooltip ( this ) ;
971
+ showTooltip ( e ) ;
972
972
window . CURRENT_TOOLTIP_ELEMENT . setAttribute ( "tabindex" , "0" ) ;
973
973
window . CURRENT_TOOLTIP_ELEMENT . focus ( ) ;
974
974
window . CURRENT_TOOLTIP_ELEMENT . onblur = tooltipBlurHandler ;
975
975
}
976
976
return false ;
977
977
} ;
978
- e . onpointerenter = function ( ev ) {
978
+ e . onpointerenter = ev => {
979
979
// If this is a synthetic touch event, ignore it. A click event will be along shortly.
980
980
if ( ev . pointerType !== "mouse" ) {
981
981
return ;
982
982
}
983
- setTooltipHoverTimeout ( this , true ) ;
983
+ setTooltipHoverTimeout ( e , true ) ;
984
984
} ;
985
- e . onpointermove = function ( ev ) {
985
+ e . onpointermove = ev => {
986
986
// If this is a synthetic touch event, ignore it. A click event will be along shortly.
987
987
if ( ev . pointerType !== "mouse" ) {
988
988
return ;
989
989
}
990
- setTooltipHoverTimeout ( this , true ) ;
990
+ setTooltipHoverTimeout ( e , true ) ;
991
991
} ;
992
- e . onpointerleave = function ( ev ) {
992
+ e . onpointerleave = ev => {
993
993
// If this is a synthetic touch event, ignore it. A click event will be along shortly.
994
994
if ( ev . pointerType !== "mouse" ) {
995
995
return ;
996
996
}
997
- if ( ! this . TOOLTIP_FORCE_VISIBLE &&
997
+ if ( ! e . TOOLTIP_FORCE_VISIBLE &&
998
998
! elemIsInParent ( ev . relatedTarget , window . CURRENT_TOOLTIP_ELEMENT ) ) {
999
999
// Tooltip pointer leave gesture:
1000
1000
//
@@ -1139,7 +1139,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
1139
1139
*
1140
1140
* Pass "true" to reset focus for tooltip popovers.
1141
1141
*/
1142
- window . hideAllModals = function ( switchFocus ) {
1142
+ window . hideAllModals = switchFocus => {
1143
1143
hideSidebar ( ) ;
1144
1144
window . hidePopoverMenus ( ) ;
1145
1145
hideTooltip ( switchFocus ) ;
@@ -1148,7 +1148,7 @@ href="https://doc.rust-lang.org/${channel}/rustdoc/how-to-read-rustdoc.html\
1148
1148
/**
1149
1149
* Hide all the popover menus.
1150
1150
*/
1151
- window . hidePopoverMenus = function ( ) {
1151
+ window . hidePopoverMenus = ( ) => {
1152
1152
onEachLazy ( document . querySelectorAll ( ".search-form .popover" ) , elem => {
1153
1153
elem . style . display = "none" ;
1154
1154
} ) ;
0 commit comments