0

Is it possible to know the code inside predefined method?

Is it possible to know the code of predefined methods or for example, what is the code of document.write()? What is the code inside document object, and what is the code inside write method? Any website where I can see the code inside them? It's just a library i think? Is it possible to see them as we can see bootstrap?

27th Oct 2021, 12:52 AM
Jonathan P. Jundarino
Jonathan P. Jundarino - avatar
5 ответов
27th Oct 2021, 2:20 AM
Pariket Thakur
Pariket Thakur - avatar
0
Beauty thanks for suggesting, but I already try mdn, and found nothing. What I mean is, function getElementById(?,?,?,?){ ?????? ??????? ???? ?????? }; #---------or--------- function write(?,?,?){ ????? ???? }; function document(?,?,?,?) { ?????? ?????? this.write = write; this.takingElemntById = getElementById; }; What are the codes inside those predefined keywords, function, method, or object? such as Math.PI alert () documentation.write() document.getElementById()
27th Oct 2021, 3:12 AM
Jonathan P. Jundarino
Jonathan P. Jundarino - avatar
0
Is it not possible to know the code inside those predefined?
27th Oct 2021, 3:14 AM
Jonathan P. Jundarino
Jonathan P. Jundarino - avatar
0
Jonathan P. Jundarino MDN provide u Array.prototype and Object.prototype predefined method
27th Oct 2021, 3:25 AM
Pariket Thakur
Pariket Thakur - avatar
0
Yes, it is possible to know the native code of js and the browser but it depends on if the code is open source. Chrome is open source, in the form of Chromium. You can check the other browsers and js engines for yourself. https://source.chromium.org/ Links to source code: document.getElementById: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/dom/nodes/Document-getElementById.html;l=34?q=document.getElementBy Array.forEach: https://source.chromium.org/chromium/chromium/src/+/main:third_party/google_input_tools/third_party/closure_library/closure/goog/array/array.js;l=197q=array.forEach&ss=chromium%2Fchromium%2Fsrc
27th Oct 2021, 4:06 PM
ODLNT
ODLNT - avatar