Skip to content

Instantly share code, notes, and snippets.

Avatar
🪶
Chaos

redgoose.eth redgoose-dev

🪶
Chaos
View GitHub Profile
@yairEO
yairEO / events.namespace.js
Last active February 21, 2022 08:17
Event Handler Namespace in Vanilla JavaScript
View events.namespace.js
var events = (function(){
function addRemove(op, events, cb){
if( cb )
events.split(' ').forEach(name => {
var ev = name.split('.')[0]
cb = cb || this._eventsNS[name]
this[op + 'EventListener'].call(this, ev, cb)
if(op == 'add')
@jackfuchs
jackfuchs / jquery.support.cssproperty.js
Last active November 20, 2022 13:56
Extends the jQuery.support object to CSS Properties
View jquery.support.cssproperty.js
/**
* jQuery.support.cssProperty
* To verify that a CSS property is supported
* (or any of its browser-specific implementations)
*
* @param p css property name
* @param rp optional, if set to true, the css property name will be returned
* instead of a boolean support indicator
* @return {mixed}
*