Confirmed users, Bureaucrats and Sysops emeriti
419
edits
(→Types) |
|||
Line 1: | Line 1: | ||
=== Types === | === Types === | ||
<pre> | <pre> | ||
Principal = (System, Origins, Unknown) | Principal = (System, Origins, Unknown) // disjoint type union | ||
System = {system} | System = {system} // system principal singleton | ||
Origin = {origin1, ..., originN} | Origin = {origin1, ..., originN} // set of N origin principals | ||
Origins = powerset(Origin) - {} | Origins = powerset(Origin) - {} | ||
Unknown = {unknown} | Unknown = {unknown} // unknown principal singleton | ||
Request = {get, set, call} | Request = {get, set, call} // principal requests of objects | ||
Stack = array [Activation] | |||
Stack = array [Activation] // array of activation objects | |||
where top() = this[this.length-1] | |||
Activation = record {global:Window, | Activation = record {global:Window, | ||
subject:Principal} | subject:Principal} | ||
Object = record {parent:Object} | |||
Object = record {parent:Object} // record with parent field | |||
Document = record {parent:Object, | |||
children:Array = []} | |||
where appendChild(c) = (c.parent = this, this.children.push(c)) | |||
Link = record {parent:Object = null, | |||
href:String, | |||
text:String} | |||
Button = record {parent:Object = null, | |||
onclick:String, | |||
text:String} | |||
IFrame = record {parent:Object = null, | |||
src:String, | |||
content:Window} | |||
Script = record {parent:Object = null, | |||
content:String} | |||
Window = record {parent:Object = null, | Window = record {parent:Object = null, | ||
location:String, | location:String, |