
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
enable-buttons
Advanced tools
Automatically enable/disable buttons based on required form inputs
Automatically enable/disable buttons based on required form inputs
npm install enable-buttons
<form class="js-enable-buttons">
<input type="text" name="hello" required>
<button type="submit" disabled>
Submit
</button>
</form>
import enableButtons from 'enable-buttons'
enableButtons()
The enableButtons
function can take an object, that
may include the following properties.
The class name that Enable Buttons uses to locate sections.
Defaults to js-enable-buttons
.
enableButtons({ className: 'my-special-class' })
If there is a button that you don't want Enable Buttons to
do it's magic on, then you can add the data-ignore
attribute to it.
<form class="js-enable-buttons">
<input type="text" name="hello" required>
<button type="submit" disabled>
Submit
</button>
<button type="button" data-ignore="true">
Don't touch me
</button>
</form>
Enable Buttons is packaged with Babel, and
makes use of Array.from
.
If you want Enable Buttons to work on browsers that don't support
this method (e.g. IE11), then you will need to
polyfill Array.from
before calling enableButtons
.
FAQs
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.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.