[whatwg] HTML Editing Commands spec minor clarifications

In section 11, the HTML Editing Commands spec says the following:

"When execCommand() is invoked, the user agent must take the action
from the list below given by commandId on the context object's first
range."

I have two questions about this:

1. What is the "context object" here? According to the linked
definition, it sounds like it should be document, but I assume it
should be the Selection object.
2. Assuming the context object is the Selection, what is the "first
range"? I assume this is the range obtained by calling getRangeAt(0)
on the selection as specified by the new Range spec. This "first
range" won't always match current browser reality since Gecko orders
ranges in a selection in document order rather than in order of
addition to the selection, as noted in the spec.

Tim

Received on Wednesday, 11 May 2011 10:39:54 UTC