Re: [html-tests] Add a test for property lookup in event handlers (#5757)

In order to give this some real world context (I am the one who raised the issue to @foolip):
I am linking an object to an input via the id attribute.  The object contains an SVG icon that serves as the user interface for the input, checkbox, radio button, or color picker.

This issue came up because not only did I give an input and an object the same id, I also gave the onchange event handler function the same name as the id.  It was convenient and makes sense largely because it's a checkbox - on/off, no related inputs like radio buttons.

My workaround/solution is to rename the function from "ID" to "changeID".  As I said, the input and object must share the id (although I <i>could</i> use a custom attribute), but the function name can be anything.
I don't know if that helps anything, but I thought it might be useful to provide a real world context.

View on GitHub: https://github.com/w3c/web-platform-tests/pull/5757#issuecomment-298743038

Received on Tuesday, 2 May 2017 19:55:33 UTC