July 2017
Intermediate to advanced
300 pages
5h 43m
English
Coming back to the file-explorer, we can start with the TitleBarActions module that listens to user click events on title bar buttons and performs the corresponding windowing action. First, we need to mark the action nodes in HTML. The ./index.html file contains the following code:
<header class="l-app__titlebar titlebar" data-bind="titlebar"> ... <a class="titlebar__btn" data-bind="close" > ;</a> </header>
Here, we specify our bounding box (data-bind="titlebar") and the close window button (data-bind="close"). Let's begin with the only button. The ./js/View/TitleBarActions.js file contains the following code:
class TitleBarActionsView { constructor( boundingEl ){ this.closeEl = boundingEl.querySelector( ...Read now
Unlock full access