Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

element-matches

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

element-matches

Super small `Element.matches` fix for older browsers (IE 9+, Edge 12+, Safari, Android browsers)

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
38K
decreased by-12.08%
Maintainers
1
Weekly downloads
 
Created
Source

Element.matches

GitHub | NPM | @jelmerdemaat

Super small Element.matches fix for older browsers. The only thing this package does is add prefixes for:

  • old IE versions (9+)
  • IE mobile(10+)
  • old Edge versions (12+)
  • Safari (desktop) versions 5 - 7
  • Safari & Chrome for iOS 4.1 - 7.1
  • a number of Android browsers
    • Android 2.2 - 4.4.4
    • UC Browser 11.4
    • Blackberry Browser 7+
    • Samsung Internet 4

See Can I Use data: https://www.caniuse.com/#feat=matchesselector

Usage

Install it and import it in your code:

npm install --save element-matches
import 'element-matches';

// Do some matching!
if (document.body.matches('.cool-body')) {
    console.info('Yeay, I am cool!');
}

Keywords

FAQs

Package last updated on 15 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc