🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-dom

Package Overview
Dependencies
Maintainers
10
Versions
2339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dom - npm Package Compare versions

Comparing version

to
15.6.1

20

lib/CSSPropertyOperations.js

@@ -106,6 +106,2 @@ /**

var warnValidStyle = function (name, value, component) {
// Don't warn for CSS variables
if (name.indexOf('--') === 0) {
return;
}
var owner;

@@ -152,9 +148,12 @@ if (component) {

}
var isCustomProperty = styleName.indexOf('--') === 0;
var styleValue = styles[styleName];
if (process.env.NODE_ENV !== 'production') {
warnValidStyle(styleName, styleValue, component);
if (!isCustomProperty) {
warnValidStyle(styleName, styleValue, component);
}
}
if (styleValue != null) {
serialized += processStyleName(styleName) + ':';
serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
serialized += dangerousStyleValue(styleName, styleValue, component, isCustomProperty) + ';';
}

@@ -187,10 +186,13 @@ }

}
var isCustomProperty = styleName.indexOf('--') === 0;
if (process.env.NODE_ENV !== 'production') {
warnValidStyle(styleName, styles[styleName], component);
if (!isCustomProperty) {
warnValidStyle(styleName, styles[styleName], component);
}
}
var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
var styleValue = dangerousStyleValue(styleName, styles[styleName], component, isCustomProperty);
if (styleName === 'float' || styleName === 'cssFloat') {
styleName = styleFloatAccessor;
}
if (styleName.indexOf('--') === 0) {
if (isCustomProperty) {
style.setProperty(styleName, styleValue);

@@ -197,0 +199,0 @@ } else if (styleValue) {

@@ -29,3 +29,3 @@ /**

*/
function dangerousStyleValue(name, value, component) {
function dangerousStyleValue(name, value, component, isCustomProperty) {
// Note that we've removed escapeTextForBrowser() calls here since the

@@ -47,3 +47,3 @@ // whole string will be escaped when the attribute is injected into

var isNonNumeric = isNaN(value);
if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
if (isCustomProperty || isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
return '' + value; // cast to string

@@ -50,0 +50,0 @@ }

@@ -59,6 +59,7 @@ /**

// if someone has already defined a value bail and don't track value
// will cause over reporting of changes, but it's better then a hard failure
// (needed for certain tests that spyOn input values)
if (node.hasOwnProperty(valueField)) {
// if someone has already defined a value or Safari, then bail
// and don't track value will cause over reporting of changes,
// but it's better then a hard failure
// (needed for certain tests that spyOn input values and Safari)
if (node.hasOwnProperty(valueField) || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
return;

@@ -65,0 +66,0 @@ }

@@ -13,2 +13,2 @@ /**

module.exports = '15.6.0';
module.exports = '15.6.1';
{
"name": "react-dom",
"version": "15.6.0",
"version": "15.6.1",
"description": "React package for working with the DOM.",

@@ -19,6 +19,6 @@ "main": "index.js",

"object-assign": "^4.1.0",
"prop-types": "~15.5.7"
"prop-types": "^15.5.10"
},
"peerDependencies": {
"react": "^15.6.0-rc.1"
"react": "^15.6.1"
},

@@ -25,0 +25,0 @@ "files": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display