Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this in event handler of nw.Window should point to the nw.Window object #4901

Closed
ghostoy opened this issue May 27, 2016 · 0 comments
Closed
Assignees

Comments

@ghostoy
Copy link
Member

ghostoy commented May 27, 2016

To be backward compatible with nw 0.12, this in event handler of nw.Window should point to the nw.Window object.

var win = nw.Window.get();
win.on('resize', function() {
    console.log('win === this ? ' + (win === this));
});
win.resizeTo(100, 100);
@ghostoy ghostoy self-assigned this May 27, 2016
ghostoy pushed a commit to ghostoy/nw.js that referenced this issue May 30, 2016
wanghongjuan added a commit to wanghongjuan/nw.js that referenced this issue May 17, 2018
- Add test for issue nwjs#4901
- This test is failed on v0.12.0, passed on v0.30.4
@wanghongjuan wanghongjuan self-assigned this May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants