ICEfaces
  1. ICEfaces
  2. ICE-1918

Extending the JavaScript Object prototype causes problems

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.1
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      All

      Description

      Our JavaScript bridge relies on the Prototype JavaScript library and extends the native JavaScript Object with our own utility functions. We've run into a problem in a couple of separate instances where other JS code is run (typically in some sort of loop or iteration) and the logic of the loop does NOT take into consideration that the functions we've bound to the top-level Object. In these cases, the behaviour gets unpredictable and cause the JS code to fail.

      There is some debate online whether what we are doing is "rude" or not a best practice. Putting that debate aside, it's likely that this will cause a number of problems for us and our customers in the future and we should look at doing this in a different way.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: