我在Scala.js中扩展了XMLHttpRequest:
class ReasonerHttpRequest(val reasonerId: String) extends XMLHttpRequest {}
然后,我尝试创建:
val http = new ReasonerHttpRequest(reasonerId)
导致以下错误:
TypeError: $g.ReasonerHttpRequest is not a constructor
我做错了什么?谢谢!