Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #13864

please help .. works great in safari and chrome, not firefox, why?

From CODEY <ed.pataky@gmail.com>
Newsgroups comp.lang.javascript
Subject please help .. works great in safari and chrome, not firefox, why?
Date 2012-05-08 11:15 -0700
Organization http://groups.google.com
Message-ID <17649710.28.1336500907727.JavaMail.geo-discussion-forums@ynjj37> (permalink)

Show all headers | View raw


Ok, I have a very complex javascript app that works great in chrome and safari, but not firefox ... 

1)  What is the fundamental difference between chrome and safari and firefox?  i thought they all used webkit, maybe not?  what is gecko ... please just give brief explanation of differences i should look into .. 

2) ok, here is my problem ... some time ago, i wanted a way to add properties to html dom elements ... i found code like below, and has been working great in chrome and safari: 

function myobject(inElement)
{
  this.element = inElement;
  this.myproperty = somevalue;
}

myobject.prototype = {
  myfunction: function() {}
  set position(pos) {}
  get x() {}
  set x(inX) {}
  get position() {}
}

Now, How this is useful is because I can, for example, create the object with an html element like a div, and attach listeners which can call functions specific to that object which i added via the prototype code ... now i dont exactly know how it works, but when i set the position using "obj.position = " or "obj.x += value", the HTML element moves!  great, i found this code somewhere and have been using it for a year now ... great on ipad, etc ... but, does not work in firefox ... no errors, but the elements position is not correct and wont move ... why?

I would greatly appreciate someone explaining why ... 

thank you

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

please help .. works great in safari and chrome, not firefox, why? CODEY <ed.pataky@gmail.com> - 2012-05-08 11:15 -0700
  Re: please help .. works great in safari and chrome, not firefox, why? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-05-08 20:24 +0200
  Re: please help .. works great in safari and chrome, not firefox, why? Jeff North <jnorthau@yahoo.com.au> - 2012-05-09 11:03 +1000

csiph-web