Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vanilla-js-dropdown
Advanced tools
Vanilla JavaScript Dropdown - a tiny (~700 bytes gzipped) select tag replacement with optgroups support.
<select>
Tiny (0.7 KB gzipped!) JavaScript replacement for <select>
that makes styling easy and consistent.
— Inspired by the blazing fast, lightweight, cross-platform and crazy popular Vanilla JS framework.
Reads the original <select>
element's options (with respect of selected
, if any), creates and attaches the pseudo-select just before the original one, and hides the original.
Upon selection it updates the original <select>
, so when you submit your form the value will be there.
JavaScript disabled? No problem! Nicely degrades to original <select>
.
Option | Required | Description |
---|---|---|
elem | yes | id of the select you want to replace or a direct DOM element |
Method | Description |
---|---|
.toggle() | Opens the select if closed and vice-versa |
.close() | Closes the select |
.open() | Opens the select |
var select = new CustomSelect({
elem: 'select',
});
// open it for the user
select.open();
npm test
Browser | Support | Dependencies |
---|---|---|
Chrome | yes | - |
Firefox | yes | - |
Safari | yes | - |
Opera | yes | - |
Edge | yes | - |
IE | yes* | Polyfill for .classList in IE9, Polyfill for CustomEvent in IE9+ |
* IE9 and up
This project uses SemVer for versioning. For the versions available, see the tags on this repository.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
See Unlicense for full details.
[2.2.0] - 2019-04-13
<optgroup>
FAQs
Vanilla JavaScript Dropdown - a tiny (~700 bytes gzipped) select tag replacement with optgroups support.
The npm package vanilla-js-dropdown receives a total of 84 weekly downloads. As such, vanilla-js-dropdown popularity was classified as not popular.
We found that vanilla-js-dropdown demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.