javascript - Detecting unhandled mouse events -
javascript - Detecting unhandled mouse events -
the question bit more complex title might create believe, in end nails downwards question. first allow me show bigger picture:
i using chromiums rendering/content/javascript engine user interfaces in application. below user interface though real 3d world needs informed interaction. can imagine user interface regular html page body transparent. whenever message user interface (like mouse move, mouse downwards , on) need able observe if message handled user interface or if should propagated world "below". has work in chrome, other browsers unimportant.
so far had next ideas (i maintain using mouse move example):
attach mouse move handler window (or html or body) , when nail -> deliver application. problem here events propagated chain no matter if handled or not
attach mouse move handler window , check if event target html or body. problem here if have tansparent container div thats used positioning or arranging kid nodes element if hovered tho should go world there
attach mouse move handler window, mark elements should not capture mouse (like transparent divs) attribute , in mouse move handler check if target has such attribute. if yes, fire event, else handled. problem here if 1 of these nomouse-elements on element wants capture mouse miss it
attach mouse move handler window, mark elements should not capture mouse attribute. add together mouse move handler elements not have no-mouse attribute , set property true. in window mouse handler check if property in event object set. work think.
is lastly thought feasible? know of improve way accomplish this? greetings , in advance.
you seek create transparent div on whole screen , attach mouse handler it. utilize z-index placing clickable elements in front end of it.
the whole screen div css:
html, body { weight: 100%; margin: 0; } #whole-screen { min-height: 100%; }
javascript html css google-chrome
Comments
Post a Comment