Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setStyle(node, style) {
for (let prop in style) {
// translate 'rpx' to px
style[prop] = convertUnit(style[prop], prop);
}
DriverWeex.setStyle(node, style);
}
});
createElement(type, props = {}) {
const style = {};
const originStyle = props.style;
if (originStyle) {
for (let prop in originStyle) {
style[prop] = convertUnit(originStyle[prop], prop);
}
}
return DriverWeex.createElement(type, Object.assign({}, props, { style }));
},
setStyle(node, style) {