Skip to content

Image element src property does not allow URL assignmentΒ #43066

Open
@TimvdLippe

Description

@TimvdLippe

Bug Report

πŸ”Ž Search Terms

image src dom

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about 4.3.0

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

let image = document.createElement('img');
image.src = new URL("http://google.com");
console.log(image.src)

πŸ™ Actual behavior

Type 'URL' is not assignable to type 'string'.(2322)

πŸ™‚ Expected behavior

Compiles cleanly (confirmed supported per whatwg/html#6440)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions