Input: T: current FDT
Input: D: Document node to be ananlyzed
Output: Set FrameList of affectable frames (or possible target frames) for D
Let PathToRoot = D
Let FrameList = null
Let n = current node = D // marker
Until n = TopFrame(T) do
n = parent of nFor each document node d in PathToRootPathToRoot = PathToRoot + n
For each subframe f of d do // subframes recursively include all child framesreturn FrameList
FrameList = FrameList + f
end Affectable\_Frames.
Explanation
The purpose of this algorithm is to discern the scope of documents in FDTs where more
than one frame has the same name. The scope of a document is the set of frames that
can be affected by links and JavaScript within this non-frames document page. In
context of the paper, frame names must be distinct (for implementation) but in
practice this is not always the case. Documents may create frames of the same name,
as in my leaflist example. As a consequence, the
algorithm also determines frames that could be concurrently displayed in a given
browser window. This fact makes it possible for a web application testing suite to
also test the validity of target frames within document anchor tags.