Comments (6)
The things that fooled me, is that I don't use setAttribute, but I use the style property, so I didn't expect to trigger the attribute change.
Thank you for helping me understanding of this issue that I suppose it was also the cause of the performance problem, I ll revert those changes too since it shouldn't gc anymore when this is fixed.
from transform-3d.
Changing node.style.cssText
reflects in the inline style
property.
var div = document.createElement('div');
div.style.cssText = 'color: red;';
alert(div.getAttribute('style'));
// color: red;
I also wasn't expecting DOMAttrModified
, used in Firefox, to fire after such operation but if you thin about it, it makes sense.
Please let me know when you have filtered operations by style and put my polyfill back instead since right now the demo does not work for me with other browsers but Chrome.
Thanks
from transform-3d.
I don't change cssText, only the transform property (unprefixed or not): https://github.com/kentaromiura/transform-3d/blob/master/Source/transform.js#L6
Anyway, a simple check with an early return fixed this for me, I'll upload the new version later.
from transform-3d.
it does not matter … whatever you do at the style
property reflects to its attribute
every engine has a setter for the style, how would these trigger repaints otherwise ?
from transform-3d.
once again, from DOMAttrModified
prospective this makes sense. I'll try to figure out if there's any way I can prevent that trigger but the logic improvement applies regardless.
from transform-3d.
In order to avoid future problems and be more consistent with current native behavior, I've updated my polyfill to version 0.1.1
and I've described the issue in the README.md
from transform-3d.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transform-3d.