
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
Javascript polyfills which let you use native javascript. Rewrite with ES2015 module.
CSS3 selectors, CSS3 media queries, ES5 extensions and a bunch of DOM utilities.
Tested on IE 8+, Firefox 17+, Chrome 15+, Safari 4+, Opera 10+.
bower install go-native --save
####go-native.ie8
every, filter, forEach, indexOf, lastIndexOf, map, reduce, reduceRight, some), Date (now, parse, toISOString, toJSON), Function (bind), Object (create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, isExtensible, isFrozen, isSealed, keys, preventExtensions, seal) and String (trim) extensionspreventDefaultstopPropagationaddEventListenerremoveEventListenerel.childElementCountel.firstElementChildel.lastElementChildel.nextElementSiblingel.previousElementSiblingnode.textContentwindow.getComputedStylewindow.innerWidthwindow.innerHeightwindow.pageXOffset / window.scrollYwindow.pageYOffset / window.scrollX####go-native
Number.isNaNString.prototype.repeatel.classListChildNode.removeimport go-native in your script (make sure link to src folder, not dist folder)
import * as gn from "../../src/go-native";
Or add go-native.js and go-native.ie8.js to your page.
<!--[if (lt IE 9)]>
<script src="path/to/go-native.ie8.js"></script>
<![endif]-->
<script src="path/to/go-native.js"></script>
gn.ready(function () {
// do something
// on DOM ready
});
var el = document.querySelector('.element');
if (gn.isInViewport(el)) {
// when element is in viewport
// do something
}
var index,
list = document.querySelectorAll('.list > li'),
current = document.querySelector('.current');
index = gn.indexOf(list, current);
// content + padding + border + margin
var box = document.querySelector('.box'),
boxWidth = gn.getOuterWidth(box);
// content + padding + border + margin
var box = document.querySelector('.box'),
boxHeight = gn.getOuterHeight(box);
// content width
var box = document.querySelector('.box'),
boxWidth = gn.getWidth(box);
// content height
var box = document.querySelector('.box'),
boxHeight = gn.getHeight(box);
var box = document.querySelector('.box'),
boxLeft = gn.getOffsetLeft(box);
var box = document.querySelector('.box'),
boxTop = gn.getOffsetTop(box);
var transitionDuration = gn.getSupportedProp(['transitionDuration', 'WebkitTransitionDuration', 'MozTransitionDuration', 'OTransitionDuration']);
console.log(transitionDuration);
var element = document.querySelector('.element'),
red = gn.getClosest(element, '.red');
var element = document.querySelector('.element'),
red = gn.getParents(element, '.red');
var element = document.querySelector('.element'),
siblings = gn.getSiblings(element);
var el = gn.createElement({
tagName: 'div',
id: 'foo',
className: 'foo',
children: [{
tagName: 'div',
html: '<b>Hello, creatElement</b>',
attributes: {
'am-button': 'primary'
}
}]
});
var container = document.querySelector('.container');
gn.append(container, '<li>Peach</li>');
gn.append(container, el);
var container = document.querySelector('.container');
gn.prepend(container, '<li>Pear</li>');
gn.prepend(container, el);
var p = doc.querySelectorAll('p'),
div = doc.createElement('div');
gn.wrap(p, div);
var p = doc.querySelectorAll('p'),
div = doc.createElement('div');
gn.wrapAll(p, div);
var container = doc.querySelectorAll('.container');
gn.unwrap(container);
NWMatcher from dperini.
selectivizr from keithclark.
respond from scottjehl.
Length from heygrady.
requestAnimationFrame from darius.
indexOf from HubSpot/youmightnotneedjquery.
ES5 Array, Function, Date, Object and String extensions from 280north/narwhal.
preventDefault, stopPropagation, addEventListener, removeEventListener, node.textContent and optimizedResize from the Mozilla Developer Network.
el.classList, el.childElementCount, el.firstElementChild, el.lastElementChild, el.nextElementSibling, el.previousElementSibling, ChildNode.remove, window.getComputedStyle, window.innerWidth, window.innerHeight, window.pageXOffset, window.pageYOffset, Array.isArray, Number.isNaN and String.prototype.repeat from Alhadis.
DOM.ready, isInViewport, getClosest, getParents, getParentsUntil and getSiblings from Chris Ferdinandi.
This project is available under the MIT license.
FAQs
A Javascript polyfills' collection which let you use native javascript.
The npm package go-native receives a total of 263 weekly downloads. As such, go-native popularity was classified as not popular.
We found that go-native 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.