question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add "enabled" property or function

See original GitHub issue

It would be nice to have an enabled function that sets a test cookie and deletes it and updates a property when successful, and memoizes the result, allowing handy semantics like if (!Cookies.enabled) { ... by instantiating the library.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
rgm3commented, Dec 30, 2015

I understand, and although I disagree and am disappointed I respect your decision. Thanks for giving it due consideration.

0reactions
FagnerMartinsBrackcommented, Apr 21, 2016

@westy92 I really recommend using Modernizr code to do this, unless you have specific requirements. Modernizr is very well tested and created by great developers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Control.Enabled Property (System.Windows.Forms)
With the Enabled property, you can enable or disable controls at run time. For example, you can disable controls that do not apply...
Read more >
Disabling and enabling a html input button - Stack Overflow
The older way to do this is to add or remove an attribute like so: var btn = $("#Button"); btn.attr("disabled", "disabled"); // or...
Read more >
Binding Functions and Enable/Disable State in HTML Buttons ...
Binding Functions and Enable/Disable State in HTML Buttons with React. ... You'll then control the disabled attribute of these two elements ...
Read more >
Javarevisited: How to enable/disable an element using jQuery ...
By using jQuery, you can grab the element you want to enable or disable and change this property by using the prop() or...
Read more >
HTML DOM Button disabled Property - W3Schools
Disable a button: document. ... The disabled property sets or returns whether a button is disabled, or not. ... function disableBtn() { document....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found