keen-tracking
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -10,2 +10,10 @@ <!-- | ||
<a name="1.0.3"></a> | ||
# 1.0.3 | ||
**FIXED:** | ||
* Minor update imports keen-core.js@0.0.3 with `Keen.ready(fn)` handler and an internal `domReady` function (previously part of this library, last bit of functionality to port over to keen-core.js) | ||
<a name="1.0.2"></a> | ||
@@ -12,0 +20,0 @@ # 1.0.2 |
@@ -56,43 +56,2 @@ (function(env) { | ||
K.ready = function(fn){ | ||
if (K.loaded) { | ||
fn(); | ||
} | ||
else { | ||
K.once('ready', fn); | ||
} | ||
}; | ||
domReady(function(){ | ||
K.loaded = true; | ||
K.emit('ready'); | ||
}); | ||
function domReady(fn){ | ||
if (K.loaded || 'undefined' === typeof document) { | ||
fn(); | ||
return; | ||
} | ||
// Firefox 3.5 shim | ||
if(document.readyState == null && document.addEventListener){ | ||
document.addEventListener('DOMContentLoaded', function DOMContentLoaded(){ | ||
document.removeEventListener('DOMContentLoaded', DOMContentLoaded, false); | ||
document.readyState = 'complete'; | ||
}, false); | ||
document.readyState = 'loading'; | ||
} | ||
testDom(fn); | ||
} | ||
function testDom(fn){ | ||
if (/in/.test(document.readyState)) { | ||
setTimeout(function(){ | ||
testDom(fn); | ||
}, 9); | ||
} | ||
else { | ||
fn(); | ||
} | ||
} | ||
// ------------------------------ | ||
@@ -99,0 +58,0 @@ // DEPRECATED |
{ | ||
"name": "keen-tracking", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Data Collection SDK for Keen IO", | ||
@@ -19,14 +19,11 @@ "main": "lib/server.js", | ||
"Dustin Larimer <dustin@keen.io> (https://github.com/dustinlarimer)", | ||
"Eric Anderson <eric@keen.io> (https://github.com/aroc)", | ||
"Joe Wegner <joe@keen.io> (http://www.wegnerdesign.com)", | ||
"Eric Anderson <eric@keen.io> (https://github.com/aroc)", | ||
"Alex Kleissner <alex@keen.io> (https://github.com/hex337)" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"node": "0.10.x" | ||
}, | ||
"dependencies": { | ||
"component-emitter": "^1.2.0", | ||
"js-cookie": "2.1.0", | ||
"keen-core": "0.0.2" | ||
"keen-core": "0.0.3" | ||
}, | ||
@@ -33,0 +30,0 @@ "devDependencies": { |
@@ -133,3 +133,3 @@ # keen-tracking.js [![Build Status](https://travis-ci.org/keen/keen-tracking.js.svg?branch=master)](https://travis-ci.org/keen/keen-tracking.js) | ||
var latest,prev=name!=='Keen'&&window.Keen?window.Keen:false;ctx[name]=ctx[name]||{ready:function(fn){var h=document.getElementsByTagName('head')[0],s=document.createElement('script'),w=window,loaded;s.onload=s.onerror=s.onreadystatechange=function(){if((s.readyState&&!(/^c|loade/.test(s.readyState)))||loaded){return}s.onload=s.onreadystatechange=null;loaded=1;latest=w.Keen;if(prev){w.Keen=prev}else{try{delete w.Keen}catch(e){w.Keen=void 0}}ctx[name]=latest;ctx[name].ready(fn)};s.async=1;s.src=path;h.parentNode.insertBefore(s,h)}} | ||
}('Keen','https://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.2.min.js',this); | ||
}('Keen','https://d26b395fwzu5fz.cloudfront.net/keen-tracking-1.0.3.min.js',this); | ||
@@ -136,0 +136,0 @@ // Executes when the library is loaded and ready |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1
77580
1367
+ Addedkeen-core@0.0.3(transitive)
- Removedkeen-core@0.0.2(transitive)
Updatedkeen-core@0.0.3