« Return to Thread:
[DOM4] Question about using sequence
On Fri, 16 Mar 2012 01:59:48 +0100, Vincent Hardy <vhardy@...> wrote:b. Use sequence<T> everywhere except where T=Node, in which case wewould use NodeList. This is consistent with DOM4 and inconsistent withinthe spec.
I think this is fine, but you should use Range[] and not sequence<Range>.
You cannot use sequence for attributes. Do you have a pointer to the
specification by the way? Kind of curious why you want to expose a list of
Range objects.
interface Region { readonly attribute DOMString flowConsumed; sequence<Range> getRegionFlowRanges(); // Returns a static list, new array returned on each call }; interface NamedFlow { readonly attribute DOMString name; readonly attribute boolean overflow; sequence<Region> getRegions(); // Returns a static list, new array returned on each call NodeList getContentNodes(); // Returns a static list, new array returned on each call
sequence<Region> getRegionsByContentNode(Node node); // idem };
interface Region {
readonly attribute DOMString flowConsumed;
sequence<Range> getRegionFlowRanges();
}; interface NamedFlow {
readonly attribute DOMString name;
readonly attribute boolean overflow;
sequence<Region> getRegions();
sequence<Node> getContentNodes();
sequence<Region> getRegionsByContentNode(Node node);
};[ArrayClass]
interface RangeList {
getter Range? item(unsigned long index);
readonly attribute unsigned long length;
};
[ArrayClass]
interface RegionList {
getter Region? item(unsigned long index);
readonly attribute unsigned long length;
};
interface Region {
readonly attribute DOMString flowConsumed;
RangeList getRegionFlowRanges();
};
interface NamedFlow {
readonly attribute DOMString name;
readonly attribute boolean overflow;
RegionList getRegions();
NodeList getContentNodes();
RegionList getRegionsByContentNode(Node node);
}; « Return to Thread:
[DOM4] Question about using sequence
| Free embeddable forum powered by Nabble | Forum Help |