This method is used to instantiate a new style object for when tags occur within the tags or classes of other types. For example, you can build a contextual style object that combines two tag types and specifies that when, and only when, they are used in that context, a certain style appearance is defined.
myStyle1 = document.tags.H1;
This fragment will yield a style object relevant to text inside a <B> tag (bold text):
myStyle2 = document.tags.B;
Now we can combine the two to yield a style object that applies only to content between the <B> tags when they are inside <H1> tags:
myStyle3 = document.contextual(myStyle1, myStyle2);
Finally, we can set some attribute of that style:
myStyle3.color = "Blue";
So, any text inside <B> tags inside <H1> tags will be blue.
This needs to be executed in a <SCRIPT> block in the <HEAD> portion of the document and cannot be executed after the body has commenced loading.
The result of this method call is a style object that operates within a particular context.
Because this is part of the JSS support, its use is deprecated and likely to become redundant now that Netscape is orienting its style sheet capabilities towards the open standards from W3C.