Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@ghostoy

Description

@ghostoy

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);

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions