The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

JavaScript::QuickJS::Promise - JavaScript `Promise` in Perl

SYNOPSIS

    my $js = JavaScript::QuickJS->new();

    $js->eval("Promise.resolve(123)")->then( sub { CORE::say "resolved: @_" } );

    CORE::say "before await";

    $js->await();

    CORE::say "after await";

DESCRIPTION

This class represents a JavaScript Promise instance in Perl.

This class is not instantiated directly.

METHODS

This exposes then(), catch(), and finally() methods that wrap the JavaScript methods of the same names.