Skip to content

Unexpected termination in JS.do console #15

@daotoad

Description

@daotoad

Describe the bug
Running a simple, valid program in the JS.do example website may lead to a valid script terminating.

Error message is:
Operation """": no method found, argument in overloaded package WebPerl::JSObject. exit(255) called, but NO_EXIT_RUNTIME is set, so halting execution but not exiting the runtime or preventing further async execution (build with NO_EXIT_RUNTIME=0, if you want a true shutdown)

To Reproduce

  1. Open https://js.do/perl/
  2. Paste and run this program:
use v5.28;
use WebPerl 'js';
use strict;
use warnings;

my $doc = js("document");
say $doc->{location}{href};

my $p = $doc->createElement('p');
$p->{innerText} = "I am perldom";
$p->{style}{cssText} = 'background: green; border: 3px red solid;';

my $container = $doc->{body}->querySelector('div.container');
$container->appendChild( $p );
#1
  1. Note that the code runs and then show an error message.
  2. Uncomment the last line, so that '1' is now a statement
  3. Click run, the code will work without errors.

Expected behavior vs. actual behavior

This code should run identically with or without the trailing constant.

Versions

  • Device: desktop
  • OS: OSX 10.14.4 (18E226)
  • Browser and version: Safari Version 12.1 (14607.1.40.1.4)
  • WebPerl: whatever is hosted on js.do

Additional context
Add any other context about the problem here. If applicable, add screenshots to help explain your problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions