RE: [wiki] Advanced Input and Editing Scenarios and API


Collaborative Software Community Group,


Greetings.  Here is another sketch of a Document Services API.




Kind regards,


Adam Sobieski







Service
interface Service
{
readonly attribute DOMString name;
readonly attribute DOMString version;

ServiceConnection connect(Element element);

sequence<ServiceOutput> invoke(Element content);
...
}


Services
interface Services
{
...
}


ServiceConnection
interface ServiceConnection
{
readonly attribute Element element;
readonly attribute Service service;

readonly attribute sequence<ServiceOutput> outputs;
...
}


ServiceConnectionCallback
callback ServiceConnectionCallback = void (sequence<ServiceOutputsRecord> updates, ServiceConnectionObserver observer);


ServiceConnectionObserver
[Constructor(ServiceConnectionCallback)]
interface ServiceConnectionObserver
{
void observe(ServiceConnection target);
void disconnect();
sequence<ServiceOutputsRecord> takeRecords(); 
};


ServiceOutput
interface ServiceOutput
{
readonly attribute Selection selection;
...
readonly attribute DataTransfer data;
...
};


HTMLServiceOutput
interface HTMLServiceOutput : ServiceOutput
{
readonly attribute HTMLMenuElement contextmenu;
...
};


ServiceDataConnection
interface ServiceDataConnection
{
readonly attribute ServiceConnection from;
readonly attribute ServiceConnection to;
...
};


Document Object Model
partial interface Range
{
DOMString getCanonicalURI();
};

partial interface Selection
{
DOMString getCanonicalURI();
};

partial interface Element
{
readonly attribute sequence<ServiceConnection> services; 
};

Received on Saturday, 5 April 2014 12:44:25 UTC