0

I have angular 2 project where i am using jquery code :

$('#someId').mousemove(someFunction);

To isolate the problem, 'someFunction' is an empty function;

When i move the cursor on the #someId element, i got those errors: Browser Errors

I Tried to raise the event from angular as well, same problem as from jquery;

What is hapenning in platform-browser.umd.ts:934 ?

  BrowserDomAdapter.prototype.setProperty = function (el, name, value) { el[name] = value; };

Solution:

The event itself cause the angular zone.js algo to check all the binds. One of them caused iframe source to recalculate the url.

John Libes
  • 363
  • 3
  • 11
  • 2
    `$('#someId').mousemove(someFunction);` it's not cleaer what is `someFunction`. is it a function or calling a function statement? if it's calling a function then you need to do something like `$('#someId').mousemove(function(){ somefunction();}); function somefunction(){//you can leave it blank or write some code here}` – Alive to die - Anant Apr 19 '17 at 04:45
  • function someFunction(){} it is not the problem, please look at the images – John Libes Apr 19 '17 at 04:50
  • 2
    @JohnLibes how do you know it's not the problem? By the look of your question it definitely is a problem. Please give all the relevant details about your question. – eko Apr 19 '17 at 04:52
  • 2
    so what's the problem? your one line code is not helpful. add some more code and tell us where you are getting problem actually? BTW i don't know about angular. Also if you are able to create a fiddle example for your problem that will be more suitable. – Alive to die - Anant Apr 19 '17 at 04:52
  • what is not clear in : "When i move the cursor on the #someId element, i got those errors: Browser Errors" @echonax : because the function is empty – John Libes Apr 19 '17 at 04:56
  • 1
    @JohnLibes what is not clear is that you are making an async request which is undefined. Where do you make this request? How do you make this request? The problem is probably that you have messed up the usage of `this` but it's hard to tell something since it could be something else. – eko Apr 19 '17 at 04:58
  • that is the problem. i am not doing any async request. the function is empty. when i delete the event listener, it is all right. is there any way that i can see what code line calling it ? @echonax – John Libes Apr 19 '17 at 06:01

0 Answers0