npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dom-support

v0.0.2

Published

Test browser rendering/styling quirks. Extracted from jQuery

Downloads

17,425

Readme

dom-support

Test for browser rendering/styling quirks. Extracted from jQuery.

Installation

$ component install timoxley/dom-support

Usage

var support = require('dom-support');
console.log(support.opacity) // true in Chrome, false in IE

API

All properties of the dom-support object are Boolean.

leadingWhitespace

IE strips leading whitespace when .innerHTML is used

tbody

Make sure that tbody elements aren't automatically inserted. IE will insert them into empty tables

htmlSerialize

Make sure that link elements get serialized correctly by innerHTML. This requires a wrapper element in IE

style

Get the style information from getAttribute (IE uses .cssText instead)

hrefNormalized

Make sure that URLs aren't manipulated. (IE normalizes it by default)

opacity

Make sure that element opacity exists (IE uses filter instead) Use a regex to work around a WebKit issue.

cssFloat

Verify style float existence (IE uses styleFloat instead of cssFloat

checkOn

Make sure that if no value is specified for a checkbox that it defaults to "on". (WebKit defaults to "" instead)

optSelected

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)

getSetAttribute

Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)

enctype

Tests for enctype support on a form

html5Clone

Makes sure cloning an html5 element does not cause problems

submitBubbles, changeBubbles, focusinBubbles

Detect support for bubbling the corresponding event in non-standard event systems (namely IE).

deleteExpando

Test to see if it's possible to delete an expando from an element (Fails in IE)

noCloneEvent

Cloning a node shouldn't copy over any bound event handlers (IE does this)

noCloneChecked

Make sure checked status is properly cloned

optDisabled

Make sure that the options inside disabled selects aren't marked as disabled (WebKit marks them as disabled)

radioValue

Check if a radio maintains its value after being appended to the DOM

checkClone

WebKit doesn't clone checked state correctly in fragments

appendChecked

Check if a disconnected checkbox will retain its checked value of true after appended to the DOM (IE6/7)

reliableHiddenOffsets

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)

boxSizing, boxSizingReliable, doesNotIncludeMarginInBodyOffset, pixelPosition

Checks box-sizing & margin behavior

reliableMarginRight

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

inlineBlockNeedsLayout

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)

shrinkWrapBlocks

Check if elements with layout shrink-wrap their children (IE 6 does this)

License

MIT