Skip to content

Add Element.matches which has all modern browser support #345

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

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

er1c
Copy link
Contributor

@er1c er1c commented Feb 14, 2019

Alternatively, this could be implemented as a polyfill for older browser support, but I don't think scala-js does anything with a polyfill, correct?

/**
* Supported by FF>34, Opera>21, Chrome>34, IE>9, Safari>4
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that some comments above have this form, but they are the exception, not the norm. The appropriate Scaladoc is to copy-paste the description at the top of the MDN page, and add MDN at the end:

  /**
   * The `matches()` method of the `Element` interface returns `true` if the
   * element would be selected by the specified selector string; otherwise, it
   * returns `false`.
   *
   * MDN
   */

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 PR updated

@sjrd
Copy link
Member

sjrd commented Feb 14, 2019

Alternatively, this could be implemented as a polyfill for older browser support, but I don't think scala-js does anything with a polyfill, correct?

Indeed, we don't do polyfills.

@sjrd sjrd merged commit f97fd58 into scala-js:master Feb 14, 2019
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