javascript - Chrome developer toolbar -functional clarification? -


i have been using chrome developer toolbar quite long time , yet have questions regarding way displays data :

question #1 why after editing dom (f2) , , adding <<script>alert(1)</script> - doesn't execute alert?

enter image description here

i mean difference make vs :

var script = document.createelement('script'); script.src = "..."; document.getelementsbytagname('head')[0].appendchild(script); 

question #2 why changing value of input , wont reflect new value in panel ?

for example : if server sends input value :

enter image description here

and add 222 :

enter image description here

why doesn't reflect change ? ( vice versa work).

question #3 there way see in pane actual sent html (like view source)? (e.g. if server send &lt; want see &lt; , not <). mean - sometimnes need debug browser got server...

#1 editing script node text content directly

when editing script node in element panel, not call script re compilation/interpretation resulting in alert not being called.

to edit scripts in devtools, go source panel.

#2 editing value web page , seeing result in devtools

value htmlinputelement property before having representation in html string. means if set attribute, set value property. if set value property typing input, or programmatically, won't reflect html string. in form scripting read value property of input, not value attribute.

to see live changes, expand object properties in right part of element panel of devtools.

#3 seeing document source

from browser press ctrl+u , see source.

in devtools, find document source when expanding list of sources in left part of source panel.

you find in network panel if devtools opened @ document download time.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -