--- # Copyright 2025 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. permalink: /feed.xml layout: docs title: Pebble Rocky.js API Documentation docs_language: rockyjs ---

{{ page.title }}

Pebble's JavaScript API allows developers to write watchfaces in JavaScript, that are executed via the firmware's JerryScript engine. For instructions on getting started with Pebble's JavaScript API, see the JS Watchface Tutorial.

The JavaScript API is broken down into the following modules:


{% for module in site.data.docs_tree.rockyjs %} {% if module['kind'] == "member" or module['kind'] == "namespace" %}

{{ module.name }}

{{ module.summary | markdownify }}

{% endif %} {% endfor %}

The JavaScript API also includes the following global functions:

{% for module in site.data.docs_tree.rockyjs %} {% if module.kind == "function" %}
{% include docs/js/function.html child=module global=true %}
{% endif %} {% endfor %}

To learn more about how to use this part of the Pebble SDK, check out the JavaScript Watchface tutorial, which also includes links to example apps.

{% include docs/js/mozilla.html %}