Frage

I've seen this when scanning the DOM in IE where PrototypeJS is present: a fire attribute is added to many elements, presumably as part of some trick to extend element functionality. Here's what I mean:

Prototype JS adds fire attribute to most elements

Now, I remember seeing this specifically in IE lte 8, but just today I noticed it in IE11, after trying to troubleshoot some new JS bugs in Magento (1.4.x, meaning Prototype 1.6.0.1).

Does anybody know why Prototype does this to elements, and if it's causing problems in IE11?

War es hilfreich?

Lösung

The fire method is how a synthetic event is sent by an element on the page, which can then be subscribed to by observer methods elsewhere. Read more here: http://api.prototypejs.org/dom/Event/fire/

Unless you are also trying to define a fire() method on your elements, you may safely ignore this. It does not have any side-effects that I'm aware of.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top