Chrome object dump
What was inside the browser's native objects when Chrome was first released.
When the iphone was first released I wanted to see what was “unique” inside the browser. The iphone was pretty inaccessible. So I wrote some scripts that would run a Dojo debug on some of the key native objects and send the response back to the server to be stored for analysis.
With Chrome’s recent release there is less of a need for this sort of approach - since the source code is there for all to read. That said, I’m not one for digging through browser source code, in my constant quest for immediate satisfaction, I through my object test dumping scripts at Chrome just to see.
Here’s the findings.
Window Object Dump
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13
NaN[object global]Attr: function Attr() { [native code] }
CDATASection: function CDATASection() { [native code] }
CSSCharsetRule: function CSSCharsetRule() { [native code] }
CSSFontFaceRule: function CSSFontFaceRule() { [native code] }
CSSImportRule: function CSSImportRule() { [native code] }
CSSMediaRule: function CSSMediaRule() { [native code] }
CSSPageRule: function CSSPageRule() { [native code] }
CSSPrimitiveValue: function CSSPrimitiveValue() { [native code] }
CSSRule: function CSSRule() { [native code] }
CSSRuleList: function CSSRuleList() { [native code] }
CSSStyleDeclaration: function CSSStyleDeclaration() { [native code] }
CSSStyleRule: function CSSStyleRule() { [native code] }
CSSStyleSheet: function CSSStyleSheet() { [native code] }
CSSValue: function CSSValue() { [native code] }
CSSValueList: function CSSValueList() { [native code] }
CharacterData: function CharacterData() { [native code] }
Comment: function Comment() { [native code] }
Counter: function Counter() { [native code] }
DOMException: function DOMCoreException() { [native code] }
DOMImplementation: function DOMImplementation() { [native code] }
DOMParser: function DOMParser() { [native code] }
Document: function Document() { [native code] }
DocumentFragment: function DocumentFragment() { [native code] }
DocumentType: function DocumentType() { [native code] }
Element: function Element() { [native code] }
Entity: function Entity() { [native code] }
EntityReference: function EntityReference() { [native code] }
Event: function Event() { [native code] }
EventException: function EventException() { [native code] }
HTMLAnchorElement: function HTMLAnchorElement() { [native code] }
HTMLAppletElement: function HTMLAppletElement() { [native code] }
HTMLAreaElement: function HTMLAreaElement() { [native code] }
HTMLBRElement: function HTMLBRElement() { [native code] }
HTMLBaseElement: function HTMLBaseElement() { [native code] }
HTMLBaseFontElement: function HTMLBaseFontElement() { [native code] }
HTMLBlockquoteElement: function HTMLBlockquoteElement() { [native code] }
HTMLBodyElement: function HTMLBodyElement() { [native code] }
HTMLButtonElement: function HTMLButtonElement() { [native code] }
HTMLCanvasElement: function HTMLCanvasElement() { [native code] }
HTMLDListElement: function HTMLDListElement() { [native code] }
HTMLDirectoryElement: function HTMLDirectoryElement() { [native code] }
HTMLDivElement: function HTMLDivElement() { [native code] }
HTMLDocument: function HTMLDocument() { [native code] }
HTMLElement: function HTMLElement() { [native code] }
HTMLEmbedElement: function HTMLEmbedElement() { [native code] }
HTMLFieldSetElement: function HTMLFieldSetElement() { [native code] }
HTMLFontElement: function HTMLFontElement() { [native code] }
HTMLFormElement: function HTMLFormElement() { [native code] }
HTMLFrameElement: function HTMLFrameElement() { [native code] }
HTMLFrameSetElement: function HTMLFrameSetElement() { [native code] }
HTMLHRElement: function HTMLHRElement() { [native code] }
HTMLHeadElement: function HTMLHeadElement() { [native code] }
HTMLHeadingElement: function HTMLHeadingElement() { [native code] }
HTMLHtmlElement: function HTMLHtmlElement() { [native code] }
HTMLIFrameElement: function HTMLIFrameElement() { [native code] }
HTMLImageElement: function HTMLImageElement() { [native code] }
HTMLInputElement: function HTMLInputElement() { [native code] }
HTMLIsIndexElement: function HTMLIsIndexElement() { [native code] }
HTMLLIElement: function HTMLLIElement() { [native code] }
HTMLLabelElement: function HTMLLabelElement() { [native code] }
HTMLLegendElement: function HTMLLegendElement() { [native code] }
HTMLLinkElement: function HTMLLinkElement() { [native code] }
HTMLMapElement: function HTMLMapElement() { [native code] }
HTMLMarqueeElement: function HTMLMarqueeElement() { [native code] }
HTMLMenuElement: function HTMLMenuElement() { [native code] }
HTMLMetaElement: function HTMLMetaElement() { [native code] }
HTMLModElement: function HTMLModElement() { [native code] }
HTMLOListElement: function HTMLOListElement() { [native code] }
HTMLObjectElement: function HTMLObjectElement() { [native code] }
HTMLOptGroupElement: function HTMLOptGroupElement() { [native code] }
HTMLOptionElement: function HTMLOptionElement() { [native code] }
HTMLParagraphElement: function HTMLParagraphElement() { [native code] }
HTMLParamElement: function HTMLParamElement() { [native code] }
HTMLPreElement: function HTMLPreElement() { [native code] }
HTMLQuoteElement: function HTMLQuoteElement() { [native code] }
HTMLScriptElement: function HTMLScriptElement() { [native code] }
HTMLSelectElement: function HTMLSelectElement() { [native code] }
HTMLStyleElement: function HTMLStyleElement() { [native code] }
HTMLTableCaptionElement: function HTMLTableCaptionElement() { [native code] }
HTMLTableCellElement: function HTMLTableCellElement() { [native code] }
HTMLTableColElement: function HTMLTableColElement() { [native code] }
HTMLTableElement: function HTMLTableElement() { [native code] }
HTMLTableRowElement: function HTMLTableRowElement() { [native code] }
HTMLTableSectionElement: function HTMLTableSectionElement() { [native code] }
HTMLTextAreaElement: function HTMLTextAreaElement() { [native code] }
HTMLTitleElement: function HTMLTitleElement() { [native code] }
HTMLUListElement: function HTMLUListElement() { [native code] }
KeyboardEvent: function KeyboardEvent() { [native code] }
MediaList: function MediaList() { [native code] }
MessageEvent: function MessageEvent() { [native code] }
MouseEvent: function MouseEvent() { [native code] }
MutationEvent: function MutationEvent() { [native code] }
NamedNodeMap: function NamedNodeMap() { [native code] }
Node: function Node() { [native code] }
NodeFilter: function NodeFilter() { [native code] }
NodeList: function NodeList() { [native code] }
Notation: function Notation() { [native code] }
OverflowEvent: function OverflowEvent() { [native code] }
ProcessingInstruction: function ProcessingInstruction() { [native code] }
ProgressEvent: function ProgressEvent() { [native code] }
Range: function Range() { [native code] }
RangeException: function RangeException() { [native code] }
Rect: function Rect() { [native code] }
SVGAngle: function SVGAngle() { [native code] }
SVGColor: function SVGColor() { [native code] }
SVGException: function SVGException() { [native code] }
SVGGradientElement: function SVGGradientElement() { [native code] }
SVGLength: function SVGLength() { [native code] }
SVGMarkerElement: function SVGMarkerElement() { [native code] }
SVGPaint: function SVGPaint() { [native code] }
SVGPathSeg: function SVGPathSeg() { [native code] }
SVGPreserveAspectRatio: function SVGPreserveAspectRatio() { [native code] }
SVGRenderingIntent: function SVGRenderingIntent() { [native code] }
SVGTextContentElement: function SVGTextContentElement() { [native code] }
SVGTextPathElement: function SVGTextPathElement() { [native code] }
SVGTransform: function SVGTransform() { [native code] }
SVGUnitTypes: function SVGUnitTypes() { [native code] }
StyleSheet: function StyleSheet() { [native code] }
StyleSheetList: function StyleSheetList() { [native code] }
Text: function Text() { [native code] }
TextEvent: function TextEvent() { [native code] }
UIEvent: function UIEvent() { [native code] }
WheelEvent: function WheelEvent() { [native code] }
XMLDocument: function Document() { [native code] }
XMLHttpRequest: function XMLHttpRequest() { [native code] }
XMLHttpRequestException: function XMLHttpRequestException() { [native code] }
XMLSerializer: function XMLSerializer() { [native code] }
XPathEvaluator: function XPathEvaluator() { [native code] }
XPathException: function XPathException() { [native code] }
XPathResult: function XPathResult() { [native code] }
XSLTProcessor: function XSLTProcessor() { [native code] }
_timer: 18
addEventListener: function () { [native code] }
alert: function () { [native code] }
atob: function () { [native code] }
back: function () { [native code] }
blur: function () { [native code] }
btoa: function () { [native code] }
captureEvents: function () { [native code] }
clearInterval: function () { [native code] }
clearTimeout: function () { [native code] }
clientInformation: [object Navigator]
close: function () { [native code] }
closed: false
confirm: function () { [native code] }
console: [object Console]
defaultStatus:
defaultstatus:
devicePixelRatio: 1
document: [object HTMLDocument]
external: [object Object]
find: function () { [native code] }
focus: function () { [native code] }
forward: function () { [native code] }
frameElement: undefined
frames: [object global]
getComputedStyle: function () { [native code] }
getMatchedCSSRules: function () { [native code] }
getSelection: function () { [native code] }
history: [object History]
innerHeight: 690
innerWidth: 1040
length: 0
location: http://test.test.test.test.com
locationbar: [object BarInfo]
menubar: [object BarInfo]
moveBy: function () { [native code] }
moveTo: function () { [native code] }
name:
navigator: [object Navigator]
object: undefined
offscreenBuffering: true
onabort: null
onbeforeunload: null
onblur: null
onchange: null
onclick: null
ondblclick: null
ondragdrop: null
onerror: null
onfocus: null
onkeydown: null
onkeypress: null
onkeyup: null
onload: null
onmousedown: null
onmousemove: null
onmouseout: null
onmouseover: null
onmouseup: null
onmousewheel: null
onmove: null
onreset: null
onresize$joinpoint$method: function (){}
onresize$joinpoint: [object Object]
onresize: function (){
var args = [];
if(!arguments.length){
var evt = null;
try{
if(obj.ownerDocument){
evt = obj.ownerDocument.parentWindow.event;
}else if(obj.documentElement){
evt = obj.documentElement.ownerDocument.parentWindow.event;
}else if(obj.event){ //obj is a window
evt = obj.event;
}else{
evt = window.event;
}
}catch(e){
evt = window.event;
}
if(evt){
args.push(dojo.event.browser.fixEvent(evt, this));
}
}else{
for(var x=0; x<arguments.length; x++){
if((x==0)&&(dojo.event.browser.isEvent(arguments[x]))){
args.push(dojo.event.browser.fixEvent(arguments[x], this));
}else{
args.push(arguments[x]);
}
}
}
// return joinpoint.run.apply(joinpoint, arguments);
return joinpoint.run.apply(joinpoint, args);
}
onscroll: null
onsearch: null
onselect: null
onsubmit: null
onunload: function (){
fp.apply(node, arguments);
oldHandler.apply(node, arguments);
}
open: function () { [native code] }
opener: null
outerHeight: 690
outerWidth: 1040
pageXOffset: 0
pageYOffset: 0
param: undefined
parent: [object global]
personalbar: [object BarInfo]
print: function () { [native code] }
prompt: function () { [native code] }
releaseEvents: function () { [native code] }
removeEventListener: function () { [native code] }
resizeBy: function () { [native code] }
resizeTo: function () { [native code] }
screen: [object Screen]
screenLeft: 180
screenTop: 77
screenX: 180
screenY: 77
scroll: function () { [native code] }
scrollBy: function () { [native code] }
scrollTo: function () { [native code] }
scrollX: 0
scrollY: 0
scrollbars: [object BarInfo]
self: [object global]
setInterval: function () { [native code] }
setTimeout: function () { [native code] }
showModalDialog: function () { [native code] }
status:
statusbar: [object BarInfo]
stop: function () { [native code] }
toolbar: [object BarInfo]
top: [object global]
window: [object global]
————————————————————
This can be compared with Firefox on a OSX.
Document Object Dump
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13
NaN[object HTMLDocument]ATTRIBUTE_NODE: 2
CDATA_SECTION_NODE: 4
COMMENT_NODE: 8
DOCUMENT_FRAGMENT_NODE: 11
DOCUMENT_NODE: 9
DOCUMENT_TYPE_NODE: 10
ELEMENT_NODE: 1
ENTITY_NODE: 6
ENTITY_REFERENCE_NODE: 5
NOTATION_NODE: 12
PROCESSING_INSTRUCTION_NODE: 7
TEXT_NODE: 3
URL: http://test.test.test.test.com
addEventListener: function () { [native code] }
adoptNode: function () { [native code] }
alinkColor:
all: undefined
anchors: [object HTMLCollection]
appendChild: function () { [native code] }
applets: [object HTMLCollection]
attributes: null
baseURI: http://test.test.test.test.com
bgColor:
body: [object HTMLBodyElement]
captureEvents: function () { [native code] }
characterSet: UTF-8
charset: UTF-8
childNodes: [object NodeList]
clear: function () { [native code] }
cloneNode: function () { [native code] }
close: function () { [native code] }
compatMode: CSS1Compat
cookie:
createAttribute: function () { [native code] }
createAttributeNS: function () { [native code] }
createCDATASection: function () { [native code] }
createComment: function () { [native code] }
createDocumentFragment: function () { [native code] }
createElement: function () { [native code] }
createElementNS: function () { [native code] }
createEntityReference: function () { [native code] }
createEvent: function () { [native code] }
createExpression: function () { [native code] }
createNSResolver: function () { [native code] }
createNodeIterator: function () { [native code] }
createProcessingInstruction: function () { [native code] }
createRange: function () { [native code] }
createTextNode: function () { [native code] }
createTreeWalker: function () { [native code] }
defaultCharset: ISO-8859-1
defaultView: [object global]
designMode: off
dir:
dispatchEvent: function () { [native code] }
doctype: [object DocumentType]
documentElement: [object HTMLHtmlElement]
documentURI: http://test.test.test.test.com
domain: test.jpsykes.com
elementFromPoint: function () { [native code] }
embeds: [object HTMLCollection]
evaluate: function () { [native code] }
execCommand: function () { [native code] }
fgColor:
firstChild: [object HTMLHtmlElement]
forms: [object HTMLCollection]
getElementById: function () { [native code] }
getElementsByClassName: function () { [native code] }
getElementsByName: function () { [native code] }
getElementsByTagName: function () { [native code] }
getElementsByTagNameNS: function () { [native code] }
getOverrideStyle: function () { [native code] }
hasAttributes: function () { [native code] }
hasChildNodes: function () { [native code] }
height: 690
images: [object HTMLCollection]
implementation: [object DOMImplementation]
importNode: function () { [native code] }
inputEncoding: UTF-8
insertBefore: function () { [native code] }
isDefaultNamespace: function () { [native code] }
isEqualNode: function () { [native code] }
isSameNode: function () { [native code] }
isSupported: function () { [native code] }
lastChild: [object HTMLHtmlElement]
lastModified: Fri, 05 Sep 2008 12:50:49 GMT
linkColor:
links: [object HTMLCollection]
localName: null
location: http://test.test.test.test.com
lookupNamespaceURI: function () { [native code] }
lookupPrefix: function () { [native code] }
namespaceURI: null
nextSibling: null
nodeName: #document
nodeType: 9
nodeValue: null
normalize: function () { [native code] }
open: function () { [native code] }
ownerDocument: null
parentElement: null
parentNode: null
plugins: [object HTMLCollection]
preferredStylesheetSet: null
prefix: null
previousSibling: null
queryCommandEnabled: function () { [native code] }
queryCommandIndeterm: function () { [native code] }
queryCommandState: function () { [native code] }
queryCommandSupported: function () { [native code] }
queryCommandValue: function () { [native code] }
querySelector: function () { [native code] }
querySelectorAll: function () { [native code] }
readyState: loading
referrer:
releaseEvents: function () { [native code] }
removeChild: function () { [native code] }
removeEventListener: function () { [native code] }
replaceChild: function () { [native code] }
scripts: [object HTMLCollection]
selectedStylesheetSet: null
styleSheets: [object StyleSheetList]
textContent: null
title: iPhone JS Object Dump
vlinkColor:
width: 1040
write: function () { [native code] }
writeln: function () { [native code] }
xmlEncoding: null
xmlStandalone: false
xmlVersion: null
————————————————————
This can be compared with Firefox on OSX.
The Event Object
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13
NaNfunction Event() { [native code] }AT_TARGET: 2
BLUR: 8192
BUBBLING_PHASE: 3
CAPTURING_PHASE: 1
CHANGE: 32768
CLICK: 64
DBLCLICK: 128
DRAGDROP: 2048
FOCUS: 4096
KEYDOWN: 256
KEYPRESS: 1024
KEYUP: 512
MOUSEDOWN: 1
MOUSEDRAG: 32
MOUSEMOVE: 16
MOUSEOUT: 8
MOUSEOVER: 4
MOUSEUP: 2
SELECT: 16384
prototype: [object Object]
————————————————————
The Console Object (I was curious)
User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13
NaN[object Console]error: function () { [native code] }
info: function () { [native code] }
log: function () { [native code] }
warn: function () { [native code] }
————————————————————
First published on jpsykes.com.