Skip to content

HTMLImageElement's create() is probably wrong #274

Closed
@jhegedus42

Description

@jhegedus42

for this create() method here

def create(): HTMLImageElement = js.native

there seems to be no corresponding method here: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement

discussion on Gitter: https://gitter.im/scala-js/scala-js?at=58ce837c6d7eb18404e37c35

object ie extends HTMLImageElement

@JSExport("Main")
  object Main extends js.JSApp {
@JSExport
         def main(): Unit = {
 

  val i2=ie.create()

 println("ie "+ie)
  println("ie "+i2)
...

gives:

Main.scala:46Uncaught TypeError: Cannot read property 'create' of undefined(…)$c_Lapp_client_Main$.main__V @ Main.scala:46$c_Lapp_client_Main$.$$js$exported$meth$main__O @ Main.scala:45$c_Lapp_client_Main$.main @ Main.scala:45(anonymous function) @ (index):1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions