Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
dom-support
Advanced tools
Test for browser rendering/styling quirks. Extracted from jQuery.
$ component install timoxley/dom-support
var support = require('dom-support');
console.log(support.opacity) // true in Chrome, false in IE
All properties of the dom-support
object are Boolean
.
IE strips leading whitespace when .innerHTML is used
Make sure that tbody elements aren't automatically inserted. IE will insert them into empty tables
Make sure that link elements get serialized correctly by innerHTML. This requires a wrapper element in IE
Get the style information from getAttribute (IE uses .cssText instead)
Make sure that URLs aren't manipulated. (IE normalizes it by default)
Make sure that element opacity exists (IE uses filter instead) Use a regex to work around a WebKit issue.
Verify style float existence (IE uses styleFloat instead of cssFloat
Make sure that if no value is specified for a checkbox that it defaults to "on". (WebKit defaults to "" instead)
Make sure that a selected-by-default option has a working selected property. (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
Tests for enctype support on a form
Makes sure cloning an html5 element does not cause problems
Detect support for bubbling the corresponding event in non-standard event systems (namely IE).
Test to see if it's possible to delete an expando from an element (Fails in IE)
Cloning a node shouldn't copy over any bound event handlers (IE does this)
Make sure checked status is properly cloned
Make sure that the options inside disabled selects aren't marked as disabled (WebKit marks them as disabled)
Check if a radio maintains its value after being appended to the DOM
WebKit doesn't clone checked state correctly in fragments
Check if a disconnected checkbox will retain its checked value of true after appended to the DOM (IE6/7)
Check if table cells still have offsetWidth/Height when they are set to display:none and there are still other visible table cells in a table row; if so, offsetWidth/Height are not reliable for use when determining if an element has been hidden directly using display:none (it is still safe to use offsets if a parent element is hidden; don safety goggles and see bug #4512 for more information). (only IE 8 fails this test)
Checks box-sizing & margin behavior
Check if div with explicit width and no margin-right incorrectly gets computed margin-right based on width of container. For more info see bug #3333 Fails in WebKit before Feb 2011 nightlies WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
Check if natively block-level elements act like inline-block elements when setting their display to 'inline' and giving them layout. (IE < 8 does this)
Check if elements with layout shrink-wrap their children (IE 6 does this)
MIT
FAQs
Test browser rendering/styling quirks. Extracted from jQuery
The npm package dom-support receives a total of 3,941 weekly downloads. As such, dom-support popularity was classified as popular.
We found that dom-support 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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.