From d59dceabcd2c7d83cb353214ed3ff2f2c8b01b11 Mon Sep 17 00:00:00 2001
From: ashimura
+ This specification does neat stuff.
+
+ This is an unofficial proposal.
+
+ See ReSpec's user guide
+ for how toget started!
+
- This specification does neat stuff.
-
+ This specification describes a programming interface to [the Web of Things](http://w3c.github.io/wot/current-practices/wot-practices.html) (WoT), that allows scripts run on a Thing to discover and access other Things through a Client API, provide resources characterized by properties, actions and events through a Server API, and access locally attached hardware through a Physical API.
+
+ Implementers need to be aware that this specification is considered unstable. Vendors interested in implementing this specification before it eventually reaches the Candidate Recommendation phase should subscribe to the [repository](https://github.com/w3c/wot-scripting-api) and take part in the discussions.
+
+ This document defines conformance criteria that apply to a single product: the UA (user agent) that implements the interfaces it contains.
+
+ The UA may be implemented in the browser, or in a separate runtime environment.
+
+ This specification can be used for implementing the WoT Scripting API in multiple language bindings. Currently ECMAScript and TypeScript definitions are described in this document. For specifying bindings in other languages, extensions of this document may be created later.
+
+ Implementations that use ECMAScript executed in a browser to implement the APIs defined in this document MUST implement them in a manner consistent with the ECMAScript Bindings defined in the Web IDL specification [[!WEBIDL]].
+
+ Implementations that use TypeScript or ECMAScript in a RunTime to implement the APIs defined in this document MUST implement them in a manner consistent with the TypeScript Bindings defined in the TypeScript specification [[!TYPESCRIPT]].
+
+ This document serves a general description of the WoT Scripting API. Language and runtime specific issues are discussed in separate extensions of this document.
+
+ A WoT runtime or simply Runtime is defined as a software stack that manages the lifecycle of WoT application scripts (see also the [Wikipedia definition](https://en.wikipedia.org/wiki/Runtime_system)). In the case of ECMAScript and TypeScript scripts, it consists of an ECMAScript interpreter, script lifecycle management, and an operating system API that provides access to local and remote resources. A Runtime can be modeled as a virtual machine in the sense that it should be completely isolated from other execution environments on memory address space, storage address space (file system), network namespace, etc. A runtime may be for instance a Node.js environment, an embedded runtime based on a small JavaScript engine, or provided by a browser.
+
+ The following terms are defined in [[!WOT-PRACTICES]]:
+
+ Consuming a Thing Description means parsing the Thing Description and building a resource model with the use of Protocol Bindings that can be used in a script for accessing and controlling the Thing. A Thing when starts up, consumes its own TD, then it exposes its WoT interface as a server. Note that a script on a Thing may consume other TDs and expose a combined interface of the consumed Things.
+
+ The terms URL and
+
+ URL path are defined in [[!URL]].
+
+ The following terms are defined in [[!HTML5]] and are used in the context of browser implementations:
+
+ browsing context,
+
+
+ top-level browsing context,
+
+
+ global object,
+
+
+ incumbent settings object,
+
+
+ script execution environment,
+
+
+ Document,
+
+
+ document base URL,
+
+
+ Window,
+
+
+ WindowProxy,
+
+
+ origin,
+
+
+ ASCII serialized origin,
+
+ executing algorithms
+ in parallel,
+
+
+ queue a task,
+
+
+ task source,
+
+
+ iframe,
+
+
+ valid MIME type.
+
+ A browsing context refers to the environment in which
+ Document objects are presented to the user. A given
+ browsing context has a single
+ The term
+
+ secure context is defined in [[!WEBAPPSEC]].
+
+
+ Promise,
+
+ JSON,
+
+ JSON.stringify and
+
+ JSON.parse
+ are defined in [[!ECMASCRIPT]].
+
+ The algorithms
+ utf-8 encode, and
+
+ utf-8 decode are defined in [[!ENCODING]].
+
+ IANA media types (formerly known as MIME types) are defined in
+ RFC2046.
+
+ As described in the [WoT Current Practices](http://w3c.github.io/wot/current-practices/wot-practices.html#vision), the Web of Things is made of Things that can describe their capabilities in a machine-interpretable format, the Thing Description (TD). By consuming a TD, a Thing creates a runtime resource model that allows accessing the Thing by an application.
+
+ The following scripting use cases are covered in this specification:
+ Introduction
+ Terminology and conventions
+
+
+ @context
property with a defining URI [[!JSON-LD]].WindowProxy
object,
+ but it can have many Document
objects, with their associated
+ Window
objects. The script execution environment
+ associated with the browsing context identifies the entity which
+ invokes this API, which can be a web app, a web page, or an
+ iframe.
+ Introduction
+ Use Cases
+
+
+
+
+
+
+
+ The trust model, attacker model, threat model and possible mitigation + proposals for the Wot Scripting API are presented in the [Security and Privacy document](http://w3c.github.io/wot-scripting-api/security-privacy.html). This section presents the chosen + security and privacy model through normative requirements to implementations. +
+ ++ Things discoverable and accessible in a WoT network SHOULD be identified and authenticated. +
++ The integrity of WoT communication SHOULD be ensured by implementations. +
- This is an unofficial proposal. -
+ ++ The main threats are summarized in the [Security and Privacy document](http://w3c.github.io/web-nfc/security-privacy.html#threats-and-possible-solutions). +
++ In this specification the following threats are considered of the highest priority: +
- See ReSpec's user guide - for how toget started! + This section summarizes the security policies which are specified as + normative requirements in the respective algorithms of this + specification.
+ The following is a list of major changes to the document. For a complete list of changes, see the [github change log](https://github.com/w3c/wot-scripting-api/commits/master). You can also view the [recently closed bugs](https://github.com/w3c/wot-scripting-api/issues?page=1&state=closed). +
++ The following problems are being discussed and need most attention: +
+ The editors would like to thank Dave Raggett, Matthias Kovatsch, and Michael Koster for their + comments and guidance to this document. +
+- This specification does neat stuff. -
-- This is an unofficial proposal. -
-- See ReSpec's user guide - for how toget started! -
-+ This specification describes a programming interface to [the Web of Things](http://w3c.github.io/wot/current-practices/wot-practices.html) (WoT), that allows scripts run on a Thing to discover and access other Things through a Client API, provide resources characterized by properties, actions and events through a Server API, and access locally attached hardware through a Physical API. +
++ Implementers need to be aware that this specification is considered unstable. Vendors interested in implementing this specification before it eventually reaches the Candidate Recommendation phase should subscribe to the [repository](https://github.com/w3c/wot-scripting-api) and take part in the discussions. +
+