Edit in GitHubLog an issue

Web APIs

The Web APIs refer to the set of commonly used APIs that are injected by the document sandbox into the global context to allow you to access common JavaScript functions.

Overview

The document sandbox runtime provides implementations of some common Web APIs to perform tasks like logging to the console. They are limited to a set of basic functions currently, as outlined in the next section. Most of the browser's usual APIs/Global Objects are not available in the document sandbox. You can invoke other browser APIs using the iframe runtime environment and communicate the result back to your code running inside the sandbox runtime.

Console Object

A global console object implementation is provided with the following JavaScript method implementations for use in your script code.

console.log()

For general output of logging information. You may use string substitution and additional arguments with this method.

console.info()

Informative logging of information. You may use string substitution and additional arguments with this method.

console.warn()

Outputs a warning message. You may use string substitution and additional arguments with this method.

console.error()

Outputs an error message. You may use string substitution and additional arguments with this method.

console.debug()

Outputs a message to the console with the log level debug.

console.clear()

Clear the console.

console.assert()

Log a message and stack trace to console if the first argument is false.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.