Hello Patrick! Exactly! I’m just mentioning that this is undesirable complexity.
Sure, all information we need is there, and we can do calculations.
Now, imagine someone new to the web. They write things to work on a canvas full screen in their very first application. Then the moment they decide instead to put the canvas as a child of a smaller area on the screen, it all falls apart in a very confusing way.
Sure, as an experienced user of web technology, I know what needs to be done as far as those calculations.
I’m just voicing that it is unnecessarily complex, when I’m willing to bet that most of the time the user just wants to observe mouse position on the element where the even listener is defined, and not on all the possible child elements in side the element that has the listener.
I wish it was more intuitive, so that the web could be easier for anyone learning web technology, instead of making them have a more difficult time.
Is it possible to make new APIs that are more intuitive?
In Qt for example, one can set an “invisible plane” inside a QML element specifically for interaction events, and the mouse position (or touch position) events are relative to this one plane, not every now or future child of the ancestor. This makes it intuitive.
I wonder, if someone who is just a regular web developer like me (not affiliated with any big companies or having any authoritative say in web standards) created a more intuitive API on top of the current confusing ones, do you think browser vendors might be willing to consider adopting something similar as a builtin API?
Is there any precedence of libraries/tools made by people that never worked at web-influencing companies like Mozilla, Apple, Microsoft, or Google, who worked at little-known companies, whose libraries had an impact on web APIs?
I’m wondering what it takes to have an impact. F.e. John Resig’s jQuery had an impact, but he also worked at Mozilla.