CSS OM should return the actual initial value instead of literal "initial"
https://bugs.webkit.org/show_bug.cgi?id=82078
Summary CSS OM should return the actual initial value instead of literal "initial"
Ryosuke Niwa
Reported 2012-03-23 12:26:27 PDT
e.g. <div id="test" style="border:solid;">hello</div> <script> alert(document.getElementById('test').borderTopWidth); </script> Both Firefox and Internet Explorer return "medium".
Attachments
L. David Baron
Comment 1 2017-03-06 17:02:15 PST
Chris Dumez
Comment 2 2017-03-07 08:49:51 PST
Ahmad Saleem
Comment 3 2022-08-20 06:46:37 PDT
I changed the test case from Comment 0 into JSFiddle: Link - https://jsfiddle.net/tx5pjqfo/show All browsers (Safari Technology Preview 151, Chrome Canary 106 and Firefox Nightly 105) show alert with "undefined" value. I am not sure whether this is something fixed or not? But all browsers are outputting same. Thanks!
Alexey Proskuryakov
Comment 4 2022-08-20 14:23:46 PDT
This still reproduces as before - WebKit and Blink get "initial", Gecko gets "medium". Blink has a patch posted for this in 2021, not landed yet. The test isn't quite right, it lacks ".style". Here is a corrected one: https://jsfiddle.net/tmjL0fp8/
Ahmad Saleem
Comment 5 2023-07-13 16:31:19 PDT
(In reply to Alexey Proskuryakov from comment #4) > This still reproduces as before - WebKit and Blink get "initial", Gecko gets > "medium". > > Blink has a patch posted for this in 2021, not landed yet. > > The test isn't quite right, it lacks ".style". Here is a corrected one: > https://jsfiddle.net/tmjL0fp8/ Safari 16.5.1 now gets 'medium' in the attached JSFiddle similar to Firefox Nightly 117.
Note You need to log in before you can comment on or make changes to this bug.