้•œๅƒ็ซ™็‚น ยท ๆœฌ้กต็”ฑ็ฌฌไธ‰ๆ–น GitHub ๅช่ฏป้•œๅƒๆไพ›๏ผŒ้ž GitHub ๅฎ˜ๆ–น็ซ™็‚น๏ผŒไธๆŽฅๅ—ไปปไฝ•็™ปๅฝ•ๆˆ–ๅ‡ญๆฎ่พ“ๅ…ฅใ€‚ๅ‰ๅพ€ github.com
Skip to content

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

Description

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)

Activity

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

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