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

Attaching listeners for standard DOM events #37

Open
djgrant opened this issue Jun 30, 2015 · 4 comments
Open

Attaching listeners for standard DOM events #37

djgrant opened this issue Jun 30, 2015 · 4 comments

Comments

@djgrant
Copy link

djgrant commented Jun 30, 2015

Is there a way to attach listeners for standard DOM events like copy, for example?

As far as I can see, this won't work as it's not a famous:event or a $dispatcher event:

events: {
  '#el': {
    'copy': function($dispatcher) {
      console.log(e);
   }
}

There doesn't seem to be a way to access the DOM node directly from with event. $dispatcher exposes a virtual DOM node for the host component but even event listeners attached to them do not show up once the DOM tree is created. $DOMElement doesn't expose a node so it's a no go either.

Any ideas?

@ildar-samit
Copy link

Have you seen the previous issue? I'm not sure if it works for a copy event, but it works for an input event (and supposed to work for others).

#36 (comment)

@djgrant
Copy link
Author

djgrant commented Jun 30, 2015

input is a native UI event from famous:events

https://github.com/Famous/framework-guides/blob/develop/%24event.md#start-of-content

@ildar-samit
Copy link

Oh right, I see.

@Imti
Copy link
Contributor

Imti commented Jun 30, 2015

@djgrant We're looking into this, checking with the Engine team to see the best way to do this in Engine.

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

No branches or pull requests

3 participants