I find it misleading that if I create a form element using Javascript with 
a particular value attribute, and then use Javascript to alter the value 
attribute that Firebug shows only the original value, and not the new 
value.  For example imagine I have the following HTML:

<p id='row'>
  <input type='text' id='Fred' name='Fred' value='Flintstone'>
</p>

And in Javascript I do:

var newinput = document.getElementById('Fred').clone(false);
newinput.id='Barney';
newinput.name='Barney';
newinput.value='Rubble';
document.getElementById('row').append(newinput);

Then Firebug displays the value attribute of the new input node as 
"Flintstone", not "Rubble", while it shows the id and name attributes as 
'Barney'.

This is the situation where element.value is not the same as 
element.defaultValue.  Because of the clone operation newinput.defaultValue 
is "Flintstone" and newinput.value is "Rubble".  To make the Firebug 
display of the input element display the current value of the value 
attribute, I must also change the value of the defaultValue attribute so 
the two attributes agree.  I feel that in this situation Firebug should 
either display just the current value of the value attribute, which is what 
the external user sees in the browser, or should display the values of both 
the value attribute and the defaultValue attribute. 

This is with Firebug 2.0.6 on Firefox 34.0 running on Ubuntu Linux.

-- 
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/8ee334f4-2073-414d-8a79-9c3b3c011671%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to