intercellular / cell

A self-driving web app framework
https://www.celljs.org
MIT License
1.51k stars 94 forks source link

Ensure setAttribute does not cause stack overflow #163

Open anywhichway opened 6 years ago

anywhichway commented 6 years ago

Line 394: the use of setAttribute without first checking to see if the attribute already has the value desired can cause infinite recursion and stack overflow if cell.js is used with over libraries that either re-define setAttribute or elevate attributes to DOM node properties with getters and setters. Guarding the call to setAttribute with getAttribute eliminates this type of problem. The issue was uncovered when working with the onsen ui framework.