Developers › Dev.Opera

opera.postError()

December 6, 2011 · by Opera Software

Description:

Makes a given text string appear in the Error Console. Helpful for debugging.

Parameters:

  • String: Any string. An array will be converted into a string.

Syntax:

void postError (<DOMString> string)

Example:

// Print a simple string to the error console
// Outputs: Hello, world!
opera.postError('Hello, world!');

// Print an object to the error console
// Outputs: {"banana":"yellow","strawberry":"red"}
var obj = {
  'banana' : 'yellow',
  'strawberry' : 'red'
};
opera.postError(JSON.stringify(obj));

About this article

Published inDev.Opera
DateDecember 6, 2011
AuthorOpera Software
Tagsextensions API, injected scripts
OriginalInternet Archive