13
closed - indicates closed window or not
14
document - document object, window contains
15
length - number of subframes
16
frames - array of subframes
17
history - reference to history object
18
location - current location URL
19
name - name of the window
20
_content - reference to the content element in the current window.
21
status - status message
22
title - title of window
23
navigator - reference on navigator object
24
screen - reference on screen object
26
innerHeight - window height
27
innerWidth - window width
28
outerHeight - Height of the outside of the browser window (scrolling)
30
pageXOffset - pixels that has been hidden by scrolling to the right
31
pageYOffset - to the down
32
scrollbars - reference to scrollbars object
33
scrollX - number of pixels document has been scrolled horizontaly
38
parent - reference to the parent window
39
opener - reference to window which opened this
40
top - reference to topmost window
44
Components - array of the components installed in the browser
45
menubar,personalbar,statusbar - references on corespondent objects
46
controllers - XUL controller objects for the current chrome window (???)
47
crypto - crypto object (???)
48
defaultStatus - default status message (???)
49
directories - Reference to directories toolbar in the current chrome (???)
54
appCodeName - codename of the current browser (Mozilla,Mozilla)
55
appName - official name of browser (Microsoft Internet Explorer,Netscape)
56
appVersion - browser version (4.0 (compatible; MSIE 6.0; Windows NT 4.0),
59
mimeTypes - reference on object containin list of mime types supported
60
oscpu - (-,Linux i586)
61
platform - platform description (Win32, Linux i586)
62
product - product name (-,Gecko)
63
productSub - product version number (-,5.0)
64
userAgent - user agent (Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0),
65
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204)
66
vendor - vendor name (-,"",Netscape6)
67
vendorSub - vendor version (-,"",6.1)
68
language - locale (-,en-US)
72
height,width - screen width & height
73
pixelDepth - color depth
74
availHeight,availWidth- amount of vert./horiz. space available for window
75
availLeft,availTop - first available pixel available from the left/top
77
top,left - Y/X coordinate of window
79
bars(Location, Menu, ...)
81
visible - visible or not
84
documet (element successor)
86
anchors, applets, embeds, forms, links, images
87
URL, location, lastModified, characterSet
88
fgColor, bgColor, linkColor, alinkColor,vlinkColor
90
documentElement- returns element that is a direct child of document, which in
91
most cases is the HTML element
92
contentWindow - window containing this document
93
doctype - DTD of the current document
94
referer - URI of the page that linked to this one
95
cookie - colon separated list of cookies
96
height,width - height/width of current document
97
implementation- DOM implementation associated with the current document
101
ownerDocument - document which ownes current element
102
attributes - array of all attributes
103
childNodes - array of all child nodes
104
length - number of child nodes
105
firstChild - First child of element
106
lastChild - Last child of element
107
nextSibling - Returns next sibling in parents child list
108
prevSibling - Returns previous sibling in parents child list
109
offsetParent - reference to parent element
110
nodeName - returns name of the node
111
nodeType - returns type of the node
112
nodeValue - returns value of current node
113
innerHTML - all markup inside element
114
tagName - returns name of the element (???)
115
dir - directionality of element
116
lang - language of attribute values & text
117
className - class of element (???)
119
namespaceURI - Namespace of node, NULL - unspecified
120
prefix - returns namespace prefix or NULL (???)
121
localName - local part of qualified name of node (???)
122
title - title of the document
123
style - block of style rules
124
tabIndex - position of element in tabbig order
126
offsetHeight, offsetWidth - Height/Width of element
127
offsetLeft, offsetTop - Number of pixels element offsets {to the left/
128
from the top} within parent element
130
nodelist - array of elements (access name[i] or name.item(i))
131
attribute - attribute node
132
NamedNodeMap - associative array of elements or attributes
136
currentTarget - Reference to the currently registered target for the event
137
relatedTarget - Secondary target for event
138
target - Reference to target to which event was originaly dispatched
139
view - Indentifies the "AbstractView" (???) from which event was
140
generated. (In example 'window' specified(without qoutes))
142
detail - returns detail about event, depend on type of event
143
eventPhase - indicate which phase of the event flow is currently being
144
evaluated (0-CAPTURING_PHASE, 1-AT_TARGET, 2-BUBBLING_PHASE)
145
timeStamp Time that the event was created
146
altKey,ctrlKey,metaKey,shiftKey - if alt,ctrl,meta,shift key pressed
147
isChar,charCode,keyCode - if keypress event / ASCII / SCAN
148
clientY, clientX - position of Event
149
layerY, layerX - (???)
151
screenY, screenX - position of Event on the screen
152
bubles - Event bubbles up through DOM or not
153
cancelBuble - Bubbling is canceled or not
154
cancelable - Cancelable
159
type - Specifies style mime ("text/css")
160
disabled - Indicates current style-sheet was applied or not
161
href - location of style-sheet
162
media - Intended destination medium for ss information
163
ownerNode - node associated with ss
164
ownerRule - if comes from @import rules, will contain CSSImportRule
165
parentStyleSheet - Returns ss that is including this one, if any
166
title - Advisory title ss
170
cssText - actual text of the style rule
171
parentStyleSheet - returns the ss object in which current rule defined
172
selectorText - textual representation of the selector for the rule set
173
style - declaration block for the current style
177
elements - array of all the form elements
178
length - number of controls in form
179
acceptCharset - list of supported charsets
180
enctype - content type of FORM element (???)
181
encoding - content type of FORM element (???)
182
method - method to submit form (GET/POST)
183
action - action of the FORM element (i.e. URL)
184
target - target of the action (i.e. frame to render its output in)
188
text node - node wich haven't nor subnodes nor attributes
189
element - non text node
191
window, document - Global variables
199
document.getElementById(id)
200
document.getElementByName(name) - Returns nodeList
201
documnet.getElementsByTagName(name) - Returns nodeList
203
Manipulating nodes & attributes
204
-------------------------------
205
document.createElement(node_name) - node_name can be for example: TD
206
document.createTextNode("text") - create text node
207
parent_node.appendChild(child_node) - adds new subnode to node childre list
208
element.insertBefore(node_name)
210
element.cloneNode([deep]) - Cloning a node, copies all of its attributes
211
but does not copy any of the text that the node contains, since
212
that text is contained in a child Text node.
213
deep - if true copy all subtree
214
element.removeChild(child)
215
element.replaceChild(new,old)
216
element.hasChildNodes()
217
element.item(i) Returns child node by index in child list
219
element.createAttribute(name)
220
element.setAttribute(name,value)
221
element.setAttributeNS(ns,name,value)
222
element.setAttributeNode(attr,value)
223
element.setAttributeNodeNS(ns,attr,value)
224
element.getAttribute(name)
225
element.getAttributeNS(namespace,name)
226
element.getAttributeNode(arrt) Returns attribute as separate node
227
element.getAttirbuteNodeNS(ns,attr)
228
element.hasAttribute(name)
229
element.hasAttributeNS(ns,name)
230
element.hasAttributes()
231
element.removeAttribute(name)
232
element.removeAttributeNS(ns,name)
233
element.removeAttributeNode(attr)
238
element.addEventListener(type,listener,useCapture)
239
type - Event type: oblur(removing keyboard focus), onclik, ondblclick,
240
onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmouseup,
241
onmousemove, onmouseout, onmouseover, onresize
242
listener - Function to be called
243
useCapture - If true all events of this type at first will be dispatched by
244
this handler, befor being dispatched to any EventTargets
245
beneath them in the tree.
246
element.removeEventListener(type,listener,useCapture)
247
element.onclick=function; Also sets event handler...
248
element.dispatchEvent(event) event - event object
249
window.captureEvents(Event.EventType) Capture all events of specified type
250
Event type: Abort, Load, Blur, MouseDown, MouseUp, MouseMove, MouseOut
251
MouseOver, Click, Change, DblClick, DragDrop, Error, Focus, KeyDown,
252
KeyUp, KeyPress, Move, Reset, Resize, Select, Submit, Unload
253
Example: window.captureEvents(Event.CLICK);
254
window.onclik = <function name>
255
window.releaseEvents(Event.eventType)
257
event.createEvent(???) Creates event
258
event.initEvent(type,bubbles,cancelable) Must be created first
259
bubles - boolean indicating whether the event should buble up through
260
the event chain or not.
261
event.initMouseEvent(String typeArg,boolean canBubbleArg,boolean cancelableArg,
262
AbstractView viewArg,int detailArg,int screenXArg,int screenYArg,
263
int clientXArg,int clientYArg,boolean ctrlKeyArg,boolean altKeyArg,
264
boolean shiftKeyArg,boolean metaKeyArg,short buttonArg,
265
EventTarget relatedTargetArg)
266
event.initUIEvent(type,canBuble,view,detail)
267
event.preventDefault() Cancels event
268
event.stopPropagation() Stop propagation of the event
269
EventHandlers: function ehandler(e) { ... }, e - Event Object
273
window.forward() History
274
window.back() History
279
window.confirm(text) Yes/No dialog
280
window.prompt(text) Prompts for a value
281
window.dump(text) Dumps text to console
282
window.escape(str) Escape string
283
window.GetAttention() Flashes application icon to get
288
window.open(URL, name, features) features - comma separated list of
289
items to opened as well: toolbar, location, directories, status,
290
menubar, scrollbars, resizable, copyhistory, width, height.
291
window.close() Close window
292
window.stop() Stop window loading
293
window.getSelection() returns selection object (can be automaticaly
295
window.sizeToContent() sizes window according to its contetnt
296
window.moveBy(deltax,deltay) moves window
297
window.moveTo(x,y) moves window
298
window.resizeBy(width,height) resizes window
299
window.scrollBy(deltax,deltay) scroll window
300
window.scroll(x,y) scroll window to specified position
301
window.scrollTo(x,y) scroll window to specified position
302
window.scrollByLines(lines) scroll window by specified number of lines
303
window.scrollByPages(pages) pages
304
window.print() print current window context
308
document.clear() Clears document
309
document.close() Close document on writing
310
document.write() Open document for writing
311
document.write("text") Write something to document
312
document.writeln("text") write + \n
316
1. ss = document.styleSheets[i]
317
ss.cssRules[0].style.<name>=<value>
318
CSS classess specified in the begining
319
2. element.style.name Returns only rules specified directly
320
(i.e. <td style="name=value">
321
3. element.setAttribute(style,"name=value") also only specified directly
322
4. element.getComputedStyle(???) Final element style
324
style.deleteRule(index)
325
style.insertRule(rule,index)
329
element.normalise() Puts all subtree in "normalized" form
330
document.supports(feature[,version]) Tests if this DOM implementation
331
supports a particular feature
332
window.navigator.javaEnabled() If Java enabled - true
334
window.setCursor(type) Changes cursor, type is: wait, auto,
335
id=window.setInterval("func_name",delay) Will execute function after specified
337
window.clearInterval(intervalID)
338
id=window.setInterval("action",delay) Specifies timeout for some actions
339
window.clearTimeout(timeoutID)
341
window.updateCommands(???) ???
345
submit() Submits form
b'\\ No newline at end of file'