blob: 403689eb3d8e9a7fb66634d2aaed091cc846dcc4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// we will handle click events
console.log('Registering menu click');
document.addEventListener('click', function _menuClick(e) {
var element = e.target || e.srcElement;
if (element.tagName !== 'A')
element = element.parentNode;
if (element.tagName === 'A' && element.getAttribute('href') !== '#') {
var url = element.getAttribute('href');
console.log('Click Intercept');
console.log(url);
Frost.loadUrl(url);
e.stopPropagation();
e.preventDefault();
}
}, true);
|