lynx-json / specification

1 stars 0 forks source link

Changes to `scope` and `data` #15

Closed johnhowes closed 7 years ago

johnhowes commented 7 years ago

This is an attempt to improve the consistency of sub-windows. Previously we had two flavors of sub-windows: content objects and any container with a scope. This proposal removes scope from containers, leaving content objects as the only form of sub-window in the lynx media type.

In order to support a sub-window with no initial content, this change also removes the requirement for an src or data value. A sub-window can start out with no content.

In order to support this change with as little disruption as possible, we're adding a new form of embedded data. Previously, the data property allowed embedding inline content with a string (encoded as either utf-8 or base64). This change adds the ability to embed a JSON document as an object or array rather than encoding it as a string. We're also adding support for inline data to link values as an alternative to an href.