verge
verge copied to clipboard
Drop undocumented `[0]` grabs
verge methods that accept (element [, cushion]) expect element to be native DOM element. Under the hood the 1.x code actually allows element to be an array-like object, in which case the first item is used. This was never a recommended syntax. I had kept it in there for back support just in case. Does anyone use this syntax? If not, I think we could safely remove it in a later minor or major version.
Actually this is briefly documented:
Test if any part of an element (or the first element in a matched set) is in the current viewport.
I still in favor of the simplification but the change should wait until 2.0.