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

Add support for Shadow DOM (native or using polyfill) #143

Merged
merged 6 commits into from
Jan 24, 2015

Conversation

taye
Copy link
Owner

@taye taye commented Dec 29, 2014

Elements that are in Shadow DOMs can be interacted with.

interact('custom-element')
  .draggable(/* ... */)
  .on('tap', function (event) { /* ... */ });

There are a few issues:

  1. Because of what I think might be a bug in Blink, Element.matches always fails with deep/shadow-piercing selectors. For example, try running this on https://polymer-project.org:

    var selector = 'paper-button::shadow *';
    document.querySelector(selector).matches(selector); // false

    So such selectors won't work with interact.js.

  2. :host, ::shadow, ::content selectors cause errors if used with the Shadow DOM polyfill

  3. Dropzones haven't been tested

@taye taye force-pushed the shadow-dom-support branch from bf31417 to d015f1c Compare December 29, 2014 23:03
@taye taye merged commit 38f9429 into master Jan 24, 2015
@taye taye deleted the shadow-dom-support branch February 27, 2015 15:18
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.

1 participant