[ 2 posts ]

Michael Hasenstein

  • Username: hasenstein
  • Joined: Fri Mar 20, 2009 7:22 am
  • Posts: 91
  • Location: Nuernberg, Germany
  • Offline
  • Profile
Tags:

Y.on("unload", fn, this) does not run in "this"

Post Posted: Thu Nov 10, 2011 6:33 am
+0-
I have to do this to get "this" set to "this", without bind() it is the global object:

Code:
Y.on("unload", Y.bind(this._unLoad, this), this);


???

Luke Smith

YUI Contributor

  • Username: lsmith
  • Joined: Thu Aug 28, 2008 7:50 am
  • Posts: 511
  • Location: Sunnyvale
  • Twitter: ls_n
  • GitHub: lsmith
  • Gists: lsmith
  • IRC: ls_n
  • YUI Developer
  • Offline
  • Profile

Re: Y.on("unload", fn, this) does not run in "this"

Post Posted: Thu Nov 10, 2011 11:43 pm
+0-
That doesn't seem right, since 'unload' is a DOM event, and missing third arg to Y.on() for DOM events defaults to Y.config.win.

If the repro is as simple as that, please file a bug.
  [ 2 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum