-1

Any one know where the function window.document.all is defined? Tried searches but nothing coming up.

Many thanks

Edit: note I am aware that thus deprecated and documentgetelementbyid should be used. still need to know what is executed when this function is run.

2 Answers2

0

It has nothing to do with Google V8. It is a legacy property of the document object. It stores an array of all elements in the document, indexed by ID.

You should use document.getElementById() instead.

Hugo Hilário
  • 2,848
  • 2
  • 27
  • 43
  • Many thanks for the repy, aware thats its legacy and not to be used. For what I am doing though I need similar functionality. If not in v8 then would this be in the chrome source? As chrome inpector console runs this command. – user2648914 Sep 09 '13 at 14:35
  • Take a look at this : http://stackoverflow.com/questions/2408424/document-all-vs-document-getelementbyid – Hugo Hilário Sep 09 '13 at 14:58
  • Read the above which relates to its deprecation, wouldstill like to find a production version of this funtion. As it currently is in Chrome, must be somewhere. – user2648914 Sep 09 '13 at 15:06
0

If you are asking this question then the source code will probably not be useful to you in the first place. But here you go:

https://github.com/WebKit/webkit/blob/5b7f307f78ff665c0102bd008d2a47b9b2f8e5b5/Source/WebCore/dom/Document.cpp#L4405

Esailija
  • 138,174
  • 23
  • 272
  • 326