Using the Tabserver extension

To use svc_tabserver, provision a service with this extension.

Pre-requisites

Services provisioned using Tabserver have to depend on a service provisioned using tabserver_connection.

The tabserver_connection service accepts connections from browsers.

Tabserver services run their JavaScript inside the connected browser tab.

Markup

<service name="Connection"
  provision="tabserver_connection"/>

<service name="TinyTable" 
  provision="tabserver" 
  dependencies="Connection">
  <prop name="tabserver.browser.src" 
    type="application/javascript" 
    src="TinyTable?prop=tabserver.browser.src"><![CDATA[
    JavaScript goes here
  ]]></prop>
</service>

Properties

Table 1. Tabserver properties
Name Description Example
tabserver.browser.src This property contains or references a piece of JavaScript, which the service can use.

It has two attributes:

type
Specifies the media type of the script. For example: application/javascript.
Tip: This attribute is optional. Use it to get syntax highlighting on the JavaScript.
src
The source of the JavaScript. It either:
  • References a JavaScript contained in a service. For example: [SomeService]?prop=tabserver.browser.src
    Note: The src attribute can reference the service that contains it, or any other service.
  • Specifies a URL path. For example: /demo/robot/power_on.js
    Note: If the path starts with a slash ("/"), it is resolved relative to the Developer Console web page. Otherwise, the path is resolved relative to the folder containing the service.
<prop name="tabserver.browser.src" 
    type="application/javascript" 
    src="[SomeService]?prop=tabserver.browser.src">
    <![CDATA[
    Property content goes here
    ]]>
</prop>