wordplaydev / wordplay

An accessible, language-inclusive programming language and IDE for creating interactive typography on the web.
Other
63 stars 44 forks source link

Reevalting a Webpage stream with a new URL returns previous stream result #507

Closed azmec closed 4 months ago

azmec commented 4 months ago

Expected behavior

When reevaluating a program containing a Webpage stream with a new url argument, the stream should evaluate to the content at that new URL or a number indicating the percentage of the page that is loaded.

Actual behavior

Instead, the stream evaluates to the previous stream result.

  1. Copy and paste the following code into a Wordplay project.

    chat: Chat()
    url: "https://www.google.com" … ∆ chat … chat
    webpage: Webpage(url)
    
    Stage([Phrase(webpage → '')] place: Place(0m 0m -15m))
  2. Enter a complete HTTPS URL into the message box and hit Enter.
  3. Step back one input in the program timeline.
  4. Step forward 20 steps in the timeline. Observe that Webpage has been passed a new argument.
  5. Step forward 2 steps. Observe that Webpage is evaluating to the previous value despite the new argument.

Screenshots

Below is an image of the Wordplay IDE at Step 4.

Image of Wordplay IDE at Step 4

Below is an image of the Wordplay IDE at Step 5.

Image of Wordplay IDE at step 5

Environment

Desktop

amyjko commented 4 months ago

Excellent issue, thank you for the reproduction steps!