lastError property

RuntimeLastError? get lastError

Populated with an error message if calling an API function fails; otherwise undefined. This is only defined within the scope of that function's callback. If an error is produced, but runtime.lastError is not accessed within the callback, a message is logged to the console listing the API function that produced the error. API functions that return promises do not set this property.

Implementation

RuntimeLastError? get lastError =>
    $js.chrome.runtime.lastError?.let(RuntimeLastError.fromJS);