mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 12:52:14 +00:00
20 lines
514 B
JavaScript
20 lines
514 B
JavaScript
|
//"use strict";
|
||
|
|
||
|
var LibraryEXAMPLE = {
|
||
|
$EXAMPLE__deps: ['$Browser'],
|
||
|
$EXAMPLE: {
|
||
|
receiveEvent: function(event) {
|
||
|
Browser.mainLoop.resume();
|
||
|
},
|
||
|
},
|
||
|
example_js_add_input_listener: function() {
|
||
|
['mousedown', 'mouseup', 'mousemove', 'DOMMouseScroll',
|
||
|
'mousewheel', 'mouseout'].forEach(function(event) {
|
||
|
Module['canvas'].addEventListener(event, EXAMPLE.receiveEvent, true);
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
autoAddDeps(LibraryEXAMPLE, '$EXAMPLE');
|
||
|
mergeInto(LibraryManager.library, LibraryEXAMPLE);
|