-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fffba9c
commit ba95768
Showing
7 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "customevent-polyfill", | ||
"version": "1.0.0", | ||
"homepage": "https://github.com/kaesetoast/customevent-polyfill", | ||
"authors": [ | ||
"Philipp Nowinski <[email protected]>" | ||
], | ||
"description": "A polyfill for CustomEvent", | ||
"main": "customevent-polyfill.js", | ||
"keywords": [ | ||
"polyfill", | ||
"customevent" | ||
], | ||
"license": "MIT", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"bower_components", | ||
"app/bower_components", | ||
"test", | ||
"tests" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(function () { | ||
'use strict'; | ||
function CustomEvent (event, params) { | ||
params = params || { bubbles: false, cancelable: false, detail: undefined }; | ||
var evt; | ||
try { | ||
evt = document.createEvent('CustomEvent'); | ||
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); | ||
} catch (error) { | ||
// fallback for browsers that don't support createEvent('CustomEvent') | ||
evt = document.createEvent('Event'); | ||
for (var param in params) { | ||
evt[param] = params[param]; | ||
} | ||
evt.initEvent(event, params.bubbles, params.cancelable); | ||
} | ||
return evt; | ||
} | ||
|
||
if(typeof window.CustomEvent !== 'undefined') { | ||
CustomEvent.prototype = window.CustomEvent.prototype; | ||
} | ||
|
||
window.CustomEvent = CustomEvent; | ||
})(); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict'; | ||
|
||
var gulp = require('gulp'), | ||
uglify = require('gulp-uglify'), | ||
rename = require('gulp-rename'); | ||
|
||
gulp.task('compress', function() { | ||
gulp.src('customevent-polyfill.js') | ||
.pipe(uglify()) | ||
.pipe(rename('customevent-polyfill.min.js')) | ||
.pipe(gulp.dest('.')); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "customevent-polyfill", | ||
"version": "1.0.0", | ||
"description": "A polyfill for CustomEvent", | ||
"main": "customevent-polyfill.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/kaesetoast/customevent-polyfill.git" | ||
}, | ||
"author": "Philipp Nowinski <[email protected]", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/kaesetoast/customevent-polyfill/issues" | ||
}, | ||
"homepage": "https://github.com/kaesetoast/customevent-polyfill", | ||
"devDependencies": { | ||
"gulp": "^3.6.2", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-uglify": "^0.3.0" | ||
} | ||
} |