File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -92,10 +92,6 @@ const language_to_flag = (language) => {
9292 }
9393} ;
9494
95- const remove_icon_loading_class = ( img ) => {
96- img . classList . remove ( "lobby-list-icon-loading" ) ;
97- } ;
98-
9995const set_lobbies = ( lobbies , visible ) => {
10096 const new_lobby_nodes = lobbies . map ( ( lobby ) => {
10197 const lobby_list_item = document . createElement ( "div" ) ;
@@ -154,8 +150,9 @@ const set_lobbies = (lobbies, visible) => {
154150 const image = document . createElement ( "img" ) ;
155151 image . className = "lobby-list-item-icon lobby-list-icon-loading" ;
156152 image . setAttribute ( "loading" , "lazy" ) ;
157- image . setAttribute ( "onLoad" ,
158- "remove_icon_loading_class(this)" ) ;
153+ image . addEventListener ( "load" , function ( ) {
154+ image . classList . remove ( "lobby-list-icon-loading" ) ;
155+ } ) ;
159156 image . setAttribute ( "src" , icon ) ;
160157
161158 const span = document . createElement ( "span" ) ;
You can’t perform that action at this time.
0 commit comments