UI - JavaScript

Improve this page

This doc covers java script specifics in abapGit UI. See also the UI - HTML pages.


abapGit UI contains JS code. Some of dynamic features relate on it e.g. keyboard navigation. The JS code is located in ui/ - the recommended way to modify it described in “Recommended asset development flow” section of UI - CSS and assets.

As SAP GUI uses Internet Explorer component to render HTML the JS code must be optimized for IE11 (and use the features available in it). Although some polyfills are available (and more can be added) at the beginning of the code (like String.includes).

The pull request CI check includes a run of eslint, so new code should confirm to the rules defined for the abapGit repository.


The JS library contains several components which can be reused in different places.

Command Palette

To add a command palette add the following code in the script method of the page.

ro_html->add( 'var gCommandPalette = new CommandPalette(enumerateFn, {' ).
ro_html->add( '  toggleKey: "F1",' ).
ro_html->add( '  hotkeyDescription: "Command ..."' ).
ro_html->add( '});' ).


See example of enumerators - enumerateToolbarActions and enumerateTocAllRepos.

to do