object JQueryStatic maps to a global jQuery object.
I use jQuery.noConflict() to scope a specific version of jQuery. So I don't think I can use JQueryStatic as is.
Maybe splitting it into a trait and an object could help:
trait JQueryStatic { ... }
object JQueryStatic extends JQueryStatic
With the regular org.scalajs.jquery.JQueryStatic from scala-js/scala-js-jquery, which is a trait, I can do just that:
val $ = g.MY.jQuery.asInstanceOf[org.scalajs.jquery.JQueryStatic]
See also how a default scala-js/scala-js-jquery scopes a default org.scalajs.jquery.JQueryStatic here.
object JQueryStaticmaps to a globaljQueryobject.I use
jQuery.noConflict()to scope a specific version of jQuery. So I don't think I can useJQueryStaticas is.Maybe splitting it into a trait and an object could help:
With the regular
org.scalajs.jquery.JQueryStaticfromscala-js/scala-js-jquery, which is a trait, I can do just that:See also how a default
scala-js/scala-js-jqueryscopes a defaultorg.scalajs.jquery.JQueryStatichere.