Skip to content

Make WebView.set_content()'s URL argument optional #2854

@hyuri

Description

@hyuri

What is the problem or limitation you are having?

Currently, the url argument in set_content() is required. But it stands to reason that, if you are directly setting raw HTML content, that content doesn't have a URL associated with it.

What we can currently do is pass an empty string to url:
my_webview.set_content("", content=html_content)

But that's clunky.

Describe the solution you'd like

In the set_content() function, make the url argument optional.

Describe alternatives you've considered

Perhaps #2851 can make this issue obsolete.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew features, or improvements to existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions