Skip to content

Conversation

@xinyun2020
Copy link

@xinyun2020 xinyun2020 commented Oct 17, 2025

Description

This change adds a fallback mechanism when constructing a combined URL using this.data.url and an optional urlSuffix.
Previously, if this.data.url was invalid or not a proper base URL, the code would throw an exception without trying to use the suffix and fail to load the frame source.

Now:

  • It first tries to construct a URL from this.data.url.
  • If that fails, it falls back to concatenating the base and suffix directly.
  • It then merges search parameters, pathname, and hash between the base URL and suffix safely.

This ensures frames still load even when the provided base URL is incomplete or invalid.

Also adds the ability to embed any website easily using the same configuration.

Use case

```custom-frames
frame: https
style: height: 500px; width: 100%;
urlSuffix: www.google.com/
```

Risk

  • Low: Affects only frame initialization logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant