Setting a CSS custom property several times makes the style attribute grow indefinitely
Reported by
hrg....@gmail.com,
Jun 15 2016
|
||
Issue description
Chrome Version : 49.0.2623.112 (Official Build) m (32-bit)
OS Version: 6.0 (Windows Vista, Windows Server 2008)
Other browsers tested:
Firefox 43: OK
What steps will reproduce the problem?
1. Run the following code:
<div></div>
<script>
elem = document.querySelector('div') ;
for(i=0 ; i<100 ; ++i)
elem.style.setProperty('--custom',i) ;
alert(elem.style.cssText) ;
</script>
What is the expected result?
The alert dialog should show the string "--custom: 99;"
What happens instead?
The alert dialog shows the string:
"--custom: 0; --custom: 1; --custom: 2; --custom: 3; --custom: 4; --custom: 5; --custom: 6; --custom: 7; --custom: 8; --custom: 9; --custom: 10; --custom: 11; --custom: 12; --custom: 13; --custom: 14; --custom: 15; --custom: 16; --custom: 17; --custom: 18; --custom: 19; --custom: 20; --custom: 21; --custom: 22; --custom: 23; --custom: 24; --custom: 25; --custom: 26; --custom: 27; --custom: 28; --custom: 29; --custom: 30; --custom: 31; --custom: 32; --custom: 33; --custom: 34; --custom: 35; --custom: 36; --custom: 37; --custom: 38; --custom: 39; --custom: 40; --custom: 41; --custom: 42; --custom: 43; --custom: 44; --custom: 45; --custom: 46; --custom: 47; --custom: 48; --custom: 49; --custom: 50; --custom: 51; --custom: 52; --custom: 53; --custom: 54; --custom: 55; --custom: 56; --custom: 57; --custom: 58; --custom: 59; --custom: 60; --custom: 61; --custom: 62; --custom: 63; --custom: 64; --custom: 65; --custom: 66; --custom: 67; --custom: 68; --custom: 69; --custom: 70; --custom: 71; --custom: 72; --custom: 73; --custom: 74; --custom: 75; --custom: 76; --custom: 77; --custom: 78; --custom: 79; --custom: 80; --custom: 81; --custom: 82; --custom: 83; --custom: 84; --custom: 85; --custom: 86; --custom: 87; --custom: 88; --custom: 89; --custom: 90; --custom: 91; --custom: 92; --custom: 93; --custom: 94; --custom: 95; --custom: 96; --custom: 97; --custom: 98; --custom: 99;"
,
Jun 17 2016
This works in both M51 (stable) and M53 (canary). The version you're using, M49, is a couple months old now. |
||
►
Sign in to add a comment |
||
Comment 1 by ashej...@chromium.org
, Jun 17 2016