-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Description
my system information
- VelocityJS version: 2.0.6
- Browser: safari
- Operating System: ios 11.4
Please describe your issue in as much detail as possible:
when i use velocity.js in ios, I found transform style setted in attribute,not style;in android everything is ok
To solve this bug, i Commented this code.
it seems like that elements been known as svg elements
var base = document.createElement('div'),
rxSubtype = /^SVG(.*)Element$/,
rxElement = /Element$/;
Object.getOwnPropertyNames(window).forEach(function (property) {
var subtype = rxSubtype.exec(property);
if (subtype && subtype[1] !== 'SVG') {
// Don't do SVGSVGElement.
try {
var element = subtype[1] ? document.createElementNS('http://www.w3.org/2000/svg', (subtype[1] || 'svg').toLowerCase()) : document.createElement('svg');
// tslint:disable-next-line:forin
for (var attribute in element) {
// Although this isn't a tween without prototypes, we do
// want to get hold of all attributes and not just own ones.
var value = element[attribute];
if (isString(attribute) && !(attribute[0] === 'o' && attribute[1] === 'n') && attribute !== attribute.toUpperCase() && !rxElement.test(attribute) && !(attribute in base) && !isFunction(value)) {
// TODO: Should this all be set on the generic SVGElement, it would save space and time, but not as powerful
registerNormalization([property, attribute, getAttribute(attribute)]);
}
}
} catch (e) {
console.error('VelocityJS: Error when trying to identify SVG attributes on ' + property + '.', e);
}
}
});
Steps for reproducing this issue (code):
this is a demo
https://codepen.io/cjh42694/pen/MWKrVYE
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels