/
nav.js
38 lines (30 loc) · 853 Bytes
/
nav.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* This file is part of the QuidPHP package <https://quidphp.com>
* Author: Pierre-Philippe Emond <emondpph@gmail.com>
* License: https://github.com/quidphp/front/blob/master/LICENSE
*/
// nav
// component for a document node, binds other components
Component.Nav = function(option)
{
// document node
Vari.check(this,document);
// components
Component.Doc.call(this,option);
Component.KeyboardEscape.call(this);
Component.Window.call(window);
// event
// trigger un click
ael(this,'keyboardEscape:catched',function() {
trigBubble(this,'click');
});
return this;
}
// initDoc
const InitDoc = Quid.InitDoc = function()
{
document.addEventListener("DOMContentLoaded", function() {
Component.Nav.call(this)
Quid.Doc.triggerSetup(this);
});
}