Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 1b2ef48b

Von Moritz Bunkus vor fast 10 Jahren hinzugefügt

ClientJS: DOM-Funktion scrollIntoView() als ClientJS->scroll_into_view implementiert

Unterschiede anzeigen:

SL/ClientJS.pm
reinit_widgets => 0, # kivi.reinit_widgets()
run => -1, # kivi.run(<TARGET>, <ARGS>)
run_once_for => 3, # kivi.run_once_for(<TARGET>, <ARGS>)
scroll_into_view => 1, # $(<TARGET>)[0].scrollIntoView()
);
sub AUTOLOAD {
js/client_js.js
else if (action[0] == 'reinit_widgets') kivi.reinit_widgets();
else if (action[0] == 'run') kivi.run(action[1], action.slice(2, action.length));
else if (action[0] == 'run_once_for') kivi.run_once_for(action[1], action[2], action[3]);
else if (action[0] == 'scroll_into_view') $(action[1])[0].scrollIntoView();
else console.log('Unknown action: ' + action[0]);

Auch abrufbar als: Unified diff