<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>jabberwerx IE8 and for in loops</title>
  <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=11401797" />
  <subtitle>jabberwerx IE8 and for in loops</subtitle>
  <id>http://developer.cisco.com/c/message_boards/find_thread?p_l_id=&amp;threadId=11401797</id>
  <updated>2013-05-23T22:09:55Z</updated>
  <dc:date>2013-05-23T22:09:55Z</dc:date>
  <entry>
    <title>RE: jabberwerx IE8 and for in loops</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11403096" />
    <author>
      <name>Thomas Vanier</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11403096</id>
    <updated>2013-02-01T14:39:57Z</updated>
    <published>2013-02-01T14:39:57Z</published>
    <summary type="html">Hi Mark,
I tend to avoid the for .. in loops for this kind of reason. You can use [url=http://api.jquery.com/jQuery.each/]jQuery.each[/url] instead to iterate over an Array or Object. jabberwerx.js bundles jQuery, and defines window.jQuery if not defined yet. So window.jQuery (identical to jabberwerx.jQuery) should be available in your application to do iterate over arrays like this:
[color=#339966]var myArray = [1, 2, 3];[/color]
[color=#339966]jQuery.each(myArray, function(index, element) {[/color]
[color=#339966]    // do something with element[/color]
[color=#339966]});[/color]
Hope this helps, Thomas</summary>
    <dc:creator>Thomas Vanier</dc:creator>
    <dc:date>2013-02-01T14:39:57Z</dc:date>
  </entry>
  <entry>
    <title>jabberwerx IE8 and for in loops</title>
    <link rel="alternate" href="http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11401796" />
    <author>
      <name>Mark Ploetner</name>
    </author>
    <id>http://developer.cisco.com/c/message_boards/find_message?p_l_id=&amp;messageId=11401796</id>
    <updated>2013-02-01T14:30:32Z</updated>
    <published>2013-02-01T14:30:32Z</published>
    <summary type="html">Hi,,
i'm facing a problem with IE8 and integrating the jabberwerx libs. I use for..in-loops to walk through arrays. in IE8 i get a new item in the array. it's the function indexOf. It seems that jabberwerx extends the Array-Prototype with that function. is there an easy way to solve the problem without looking for every for...in-loop  and add an if-statement to check for hasOwnProperty()?
 
regards
Mark</summary>
    <dc:creator>Mark Ploetner</dc:creator>
    <dc:date>2013-02-01T14:30:32Z</dc:date>
  </entry>
</feed>

