What you're updating in your example script is the DOM value, not the HTML
attribute. I admit that this might be confusing at first sight, though what
you see is the expected behavior. See comment 13 of issue 4165
<https://code.google.com/p/fbug/issues/detail?id=4165#c13> for a more
detailed description why.
Btw. a similar thing happens for <textarea>. Compare the textContent
property with the value property.
Sebastian
On Thursday, February 5, 2015 at 10:56:43 PM UTC+1, thejusme wrote:
>
> If you have JS that dynamically updates the 'value' attribute of an input
> (I tested with a text input), the HTML tab in Firebug will continue to
> display only the default value. For example:
>
> --- BEGIN HTML ---
> <html>
> <head>
> <script>
>
> function changestuff()
> {
> var obj = document.getElementById('textbox');
> obj.value = '';
> obj.className = 'test';
> }
>
> </script>
> </head>
> <body>
> <input id='textbox' value='stuff'>
> <input type='button' value='change textbox value' onclick='changestuff()'>
> </body>
> </html>
> --- END HTML ---
>
> Steps to reproduce:
>
> 1.) Open Firefox with the above HTML
> 2.) Inspect the 'textbox' element in Firebug
> 3.) Click the 'change textbox value' button
> 4.) Notice that the HTML displayed in Firebug is still: "<input
> id='textbox' value='stuff'>" when it should be: "<input id='textbox'
> value=''>"
>
> Not sure if this happens with other tags or attributes. I swear this is
> new behavior, but I could be going crazy. I guess there could be some
> discussion as to the expected behavior here; whether Firebug should keep
> displaying the default value or the actual value. My vote would obviously
> be for Firebug to represent 100% what is actually displayed in the browser,
> as it does in all other cases that I know of.
>
--
You received this message because you are subscribed to the Google Groups
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/firebug.
To view this discussion on the web visit
https://groups.google.com/d/msgid/firebug/e950227f-dfce-4d62-a269-77590131a951%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.