Skip to content

HTMLImageElement's create() is probably wrong #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jhegedus42 opened this issue Mar 19, 2017 · 0 comments · Fixed by #366
Closed

HTMLImageElement's create() is probably wrong #274

jhegedus42 opened this issue Mar 19, 2017 · 0 comments · Fixed by #366

Comments

@jhegedus42
Copy link

jhegedus42 commented Mar 19, 2017

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
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 a pull request may close this issue.

1 participant