Standard Web API

HTML, CSS, and JavaScript are the core web technologies to build web pages or web applications. HTML presents the structure of the pages or the application using markup. CSS formats the contents written in HTML such as colors, layouts, font, etc. JavaScript is a programming language for web which has been standardized in the ECMAScript.

 

Using HTML5, CSS3, and JavaScript, web applications can be built operable in webOS TV. This article provides speccification charts that lists methods, attributes, and events of HTML5, properties of CSS3,  and features of JavaScript (ECAMScript features) which are currently supported by webOS TV and webOS TV Emulator. Even though, some are not supported now, they will be supported afterward and this article always keeps up-to-date state.

 

The linked document above is written based on the HTML5/CSS5 specifications supported by the webOS TV platform. Therefore, if the name of methods, attributes, and events for API is not listed up on the table, the webOS does not support it.

 

The table below shows a brief summary of supported HTML5 elements:

Category

Description

Video & Audio,

Track & Media

The HTML5 Audio, Video, Source, Track, and Media elements are used for playing media files such as audio, video, movies on the web without additional plug-ins. Read "Supported Internet Media Type" to know the supported media types for video, audio and hls.

For the detailed guides on using Web Audio API and audio element in your app for playing multi-sound, see Playing multi-sound.

Communication 

Communication is used to share data called ‘MessageEvent’ between multiple programs in an asynchronous manner. Communication includes Server-sent EventsWeb SocketsCross-document Messaging, and Channel Messaging

Graphic

The CanvasSVG, and WebGL  are used for graphic feature as below:

  • Canvas: For drawing graphics using JavaScript. Text, videos or animations can be inserted in the canvas as well as two-dimensional shapes such as circles, squares, lines and images.
     
  • SVG: To define vector-based graphics in XML format for the web. Two-dimensional graphics can be drawn using graphic tags like <rect> and <line>. It also helps to change graphics dynamically using JavaScript or to decorate graphics using CSS. SVG is better than Canvas for creating clear, vivid graphics.
     
  • WebGL: WebGL is used to define three dimensional graphics with an API that fits in with the OpenGL 2.0 API.

Web Application 

The Web Application provides cache for working applications, even when they are offline. The application cache saves resources such as current web pages and links related to the current page to use the application without an internet connection. Therefore, the application can be used offline. Application cache also loads cached resources so the application runs quickly and the browser just receives changes from the server. This helps to reduce the burden.

Web Storage 

The followings are provided for storaging:

  • Web Storage is a kind of client-side database, which saves a small amount of data into a client’s disk. Cookies have been used to store user’s data of web pages locally, but taken much time for response and affected the website’s performance. Web Storage can be substituted for cookies and is more secure and faster. It uses key-value pair to access to data on database. Web Storage is divided into localStorage and sessionStorage for their purposes. localStorage stores data without expiration date and sessionStorage stores data for only one session.
  • IndexedDB is a kind of client-side database like Web Storage. It stores large amount of object hierarchy into a local disk using key-value pair. IndexedDB provides interfaces optimized to manage database using scripts.

Workers 

Web Workers are used to support multi-tasking in the web browser. Web Workers divide a task into many workers, and run JavaScript codes in parallel in the background, separately from UI scripts. So, the work scripts do not affect to UI scripts and Web Workers have no burden to web browser.

History

History is used for access to a browser’s history. 

The table below shows a brief summary of supported specifications of CSS3. 

CSS 3

Supported Specifications

Static CSS 

Backgrounds, Borders and Outline, Box, Columns, Flexible Box, Text, Fonts, User Interface, Media Queries, and Selectors which can apply static effects to elements.

Dynamic CSS 

Transforms, Transitions, and Animations, which can apply dynamic effects to elements.

The table below shows a brief summary of supported specifications of CSS3. 

ECMAScript Version

Supported Specifications by webOS 3.0

ECMAScript 2016+

2017 annex b (almost)

ECMAScript 6

Syntax (rarely), Bindings (rarely), Built-ins (almost), Built-in extensions (almost), Misc (rarely), Annex b (almost)
ECMAScript 5 Object/array literal extensions, Object static methods, Array methods (almost), String properties and methods, Date methods, Function.prototype.bind, JSON, Immutable globals, Miscellaneous (almost), Strict mode (almost)
Navigation