This code snippet do nothing in IE and crash on Edge, while it's supposed to be supported

This code snippet do nothing in IE and crash on Edge, while it's supposed to be supported

Hello, 

I have what seems like a compatibility problem between this little JS code:


and Internet Explorer and Edge.

I have in my HTML a personalized Select (rendered via TWIG in response to PHP, so a bit hard to put in the fiddle): instead of a plain list, each option of the select is displayed inside a div on its own. The div is larger than the label, and, by default with only HTML/CSS, the only way to select an element from those options is clicking on the label, which is not very practical. This code is supposed to make possible the selection by clicking anywhere in the div ( and redirecting this click to the label). It works fine on Firefox, Webkit (Vivaldi, Chrome, mobile included), Android Stock Browser (I don't know on what this one is based), but doesn't work on Internet Explorer 11, and make both the page AND the local test server of PHPStorm crash on Edge.

I verified every element I used, and they are all supposed to be supported by all modern browser. Do you have any idea of what could cause this?

Thanks in advance.