Comparing version 3.2.0 to 4.0.0
@@ -29,3 +29,4 @@ /* jshint node: true */ | ||
**/ | ||
var detect = module.exports = function(target, prefixes) { | ||
var detect = module.exports = function(target, opts) { | ||
var attach = (opts || {}).attach; | ||
var prefixIdx; | ||
@@ -36,2 +37,6 @@ var prefix; | ||
// initialise to default prefixes | ||
// (reverse order as we use a decrementing for loop) | ||
var prefixes = ((opts || {}).prefixes || ['ms', 'o', 'moz', 'webkit']).concat(''); | ||
// if we have no host object, then abort | ||
@@ -42,6 +47,2 @@ if (! hostObject) { | ||
// initialise to default prefixes | ||
// (reverse order as we use a decrementing for loop) | ||
prefixes = (prefixes || ['ms', 'o', 'moz', 'webkit']).concat(''); | ||
// iterate through the prefixes and return the class if found in global | ||
@@ -63,4 +64,7 @@ for (prefixIdx = prefixes.length; prefixIdx--; ) { | ||
// return the host object member | ||
return hostObject[target] = hostObject[testName]; | ||
if (attach) { | ||
hostObject[target] = hostObject[testName]; | ||
} | ||
return hostObject[testName]; | ||
} | ||
@@ -67,0 +71,0 @@ } |
{ | ||
"name": "rtc-core", | ||
"description": "Core definitions and functions for the rtc.io suite", | ||
"version": "3.2.0", | ||
"version": "4.0.0", | ||
"dependencies": { | ||
@@ -6,0 +6,0 @@ "detect-browser": "^1.0.0" |
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
27595
331