Skip to content

Conversation

@jamiemlaw
Copy link

No description provided.

Now, when defining a new Ply view, the user can define an `__events` objects on the prototype, that takes as its keys an event name and the object id, separated by a space, e.g. `'click closeBtn'` would be used to attach a click handler to `this.objects.closeBtn`. As its values, it takes the name of the function to execute, e.g. `'close'` to run `this.close`. The callback function takes two arguments: the first is the event object, and the second is a shortcut to the element that triggered the event. Within the function, `this` refers to the Ply object, not the element, like in previous versions of Ply. This removes the need to use `self`, and allows for referencing other methods.
@ghost ghost assigned richardscarrott Dec 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants