Skip to content

Commit 02f94f9

Browse files
committed
Remove stuff from ext.* that do not make sense anymore.
1 parent 67034db commit 02f94f9

File tree

4 files changed

+1
-327
lines changed

4 files changed

+1
-327
lines changed

api-reports/2_12.txt

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -24183,31 +24183,11 @@ ext/Ajax.InputData[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData
2418324183
ext/Ajax.InputData[SO] implicit def formdata2ajax(b: FormData): InputData
2418424184
ext/Ajax.InputData[SO] implicit def str2ajax(s: String): InputData
2418524185
ext/AjaxException[SC] def isTimeout = xhr.status = = 0 && xhr.readyState = = 4
24186-
ext/Color[SC] def *(c: Color) = Color(r * c.r, g * c.g, b * c.b)
24187-
ext/Color[SC] def +(c: Color) = Color(r + c.r, g + c.g, b + c.b)
24188-
ext/Color[SC] def toHex: String
24189-
ext/Color[SC] override def toString() = s"rgb($r, $g, $b)"
24190-
ext/Color[SO] val Black = Color(0, 0, 0)
24191-
ext/Color[SO] val Blue = Color(0, 0, 255)
24192-
ext/Color[SO] val Cyan = Color(0, 255, 255)
24193-
ext/Color[SO] val Green = Color(0, 255, 0)
24194-
ext/Color[SO] val LongHex = s"#($d$d)($d$d)($d$d)".r
24195-
ext/Color[SO] val Magenta = Color(255, 0, 255)
24196-
ext/Color[SO] val RGB = "rgb\\((\\d+), (\\d+), (\\d+)\\)".r
24197-
ext/Color[SO] val Red = Color(255, 0, 0)
24198-
ext/Color[SO] val ShortHex = s"#($d)($d)($d)".r
24199-
ext/Color[SO] val White = Color(255, 255, 255)
24200-
ext/Color[SO] val Yellow = Color(255, 255, 0)
24201-
ext/Color[SO] val all = Seq( White, Red, Green, Blue, Cyan, Magenta, Yellow, Black )
24202-
ext/Color[SO] def apply(s: String): Color
24203-
ext/Color[SO] val d = "[0-9a-zA-Z]"
24204-
ext/Color[SO] def hex(x: String) = Integer.parseInt(x, 16)
2420524186
ext/EasySeq[SC] def apply(x: Int) = jsApply(x)
2420624187
ext/EasySeq[SC] def hasNext: scala.Boolean
2420724188
ext/EasySeq[SC] def iterator = new Iterator[T] { var index = 0 def hasNext: scala.Boolean = index < jsLength def next() = { val res = jsApply(index) index + = 1 res } }
2420824189
ext/EasySeq[SC] def length = jsLength
2420924190
ext/EasySeq[SC] def next() = { val res = jsApply(index) index + = 1 res }
24210-
ext/Image[SO] def createBase64Svg(s: String) = { val img = dom.document.createElement("img").asInstanceOf[html.Image] img.src = "data:image/svg+xml;base64, " + s img }
2421124191
ext/KeyCode[SO] final val A = 65
2421224192
ext/KeyCode[SO] final val Alt = 18
2421324193
ext/KeyCode[SO] final val B = 66
@@ -24635,12 +24615,6 @@ ext/KeyValue.Multimedia[SO] final val SpellCheck = "SpellCheck"
2463524615
ext/KeyValue.Multimedia[SO] final val VolumeDown = "VolumeDown"
2463624616
ext/KeyValue.Multimedia[SO] final val VolumeMute = "VolumeMute"
2463724617
ext/KeyValue.Multimedia[SO] final val VolumeUp = "VolumeUp"
24638-
ext/LocalStorage[SO] def apply(key: String): Option[String]
24639-
ext/LocalStorage[SO] def clear(): Unit
24640-
ext/LocalStorage[SO] def key(index: Int): Option[String]
24641-
ext/LocalStorage[SO] def length: Int
24642-
ext/LocalStorage[SO] def remove(key: String): Unit
24643-
ext/LocalStorage[SO] def update(key: String, data: String): Unit
2464424618
ext/NamedNodeMapMap[SC] override def + = (kv: (String, Attr)): this.type
2464524619
ext/NamedNodeMapMap[SC] override def - = (key: String): this.type
2464624620
ext/NamedNodeMapMap[SC] override def clear(): Unit
@@ -24649,39 +24623,7 @@ ext/NamedNodeMapMap[SC] override def hasNext: Boolean
2464924623
ext/NamedNodeMapMap[SC] override def iterator: Iterator[(String, Attr)]
2465024624
ext/NamedNodeMapMap[SC] def length: Int
2465124625
ext/NamedNodeMapMap[SC] override def next(): (String, Attr)
24652-
ext/SessionStorage[SO] def apply(key: String): Option[String]
24653-
ext/SessionStorage[SO] def clear(): Unit
24654-
ext/SessionStorage[SO] def key(index: Int): Option[String]
24655-
ext/SessionStorage[SO] def length: Int
24656-
ext/SessionStorage[SO] def remove(key: String): Unit
24657-
ext/SessionStorage[SO] def update(key: String, data: String): Unit
24658-
ext/Storage[SC] def apply(key: String): Option[String]
24659-
ext/Storage[SC] def clear(): Unit
24660-
ext/Storage[SC] def key(index: Int): Option[String]
24661-
ext/Storage[SC] def length: Int
24662-
ext/Storage[SC] def remove(key: String): Unit
24663-
ext/Storage[SC] def update(key: String, data: String): Unit
24664-
ext/TouchEvents[JT] var ontouchcancel: js.Function1[dom.TouchEvent, _]
24665-
ext/TouchEvents[JT] var ontouchend: js.Function1[dom.TouchEvent, _]
24666-
ext/TouchEvents[JT] var ontouchmove: js.Function1[dom.TouchEvent, _]
24667-
ext/TouchEvents[JT] var ontouchstart: js.Function1[dom.TouchEvent, _]
24668-
ext/TouchEvents[SO] implicit def HTMLDocumentToTouchEvents(html: dom.HTMLDocument): TouchEvents
24669-
ext/TouchEvents[SO] implicit def WindowToTouchEvents(window: dom.Window): TouchEvents
24670-
ext/package[SO] def cast[T] = x.asInstanceOf[T]
24671-
ext/package[SO] implicit def color2String(c: Color): String
24672-
ext/package[SO] def fillCircle(x: Double, y: Double, r: Double) = { prepCircle(x, y, r) ctx.fill() }
24673-
ext/package[SO] def fillPath(points: (Double, Double)*) = { prepPath(points) ctx.fill() }
24674-
ext/package[SO] implicit def pimpAnimatedLength(x: svg.AnimatedLength): Double
24675-
ext/package[SO] implicit def pimpAnimatedNumber(x: svg.AnimatedNumber): Double
2467624626
ext/package[SO] implicit def pimpNamedNodeMap(namedNodeMap: NamedNodeMap): NamedNodeMapMap
24677-
ext/package[SO] implicit def pimpRichAnimatedLength(x: svg.AnimatedLength): runtime.RichDouble
24678-
ext/package[SO] implicit def pimpRichAnimatedNumber(x: svg.AnimatedNumber): runtime.RichDouble
24679-
ext/package[SO] def prepCircle(x: Double, y: Double, r: Double) = { ctx.beginPath() ctx.arc(x, y, r, 0, math.Pi * 2) }
24680-
ext/package[SO] def prepPath(points: Seq[(Double, Double)], closed: Boolean = true) = { ctx.beginPath() if (closed) ctx.moveTo(points.last._1, points.last._2) for (p <- points) { ctx.lineTo(p._1, p._2) } }
24681-
ext/package[SO] def strokeCircle(x: Double, y: Double, r: Double) = { prepCircle(x, y, r) ctx.stroke() }
24682-
ext/package[SO] def strokePath(points: (Double, Double)*) = { prepPath(points) ctx.stroke() }
24683-
ext/package[SO] def strokePathOpen(points: (Double, Double)*) = { prepPath(points, closed = false) ctx.stroke() }
24684-
ext/package.Castable[SC] def cast[T] = x.asInstanceOf[T]
2468524627
ext/package.PimpedHtmlCollection[SC] def apply(x: Int) = jsApply(x)
2468624628
ext/package.PimpedHtmlCollection[SC] def hasNext: scala.Boolean
2468724629
ext/package.PimpedHtmlCollection[SC] def iterator = new Iterator[T] { var index = 0 def hasNext: scala.Boolean = index < jsLength def next() = { val res = jsApply(index) index + = 1 res } }
@@ -24702,13 +24644,6 @@ ext/package.PimpedTouchList[SC] def hasNext: scala.Boolean
2470224644
ext/package.PimpedTouchList[SC] def iterator = new Iterator[T] { var index = 0 def hasNext: scala.Boolean = index < jsLength def next() = { val res = jsApply(index) index + = 1 res } }
2470324645
ext/package.PimpedTouchList[SC] def length = jsLength
2470424646
ext/package.PimpedTouchList[SC] def next() = { val res = jsApply(index) index + = 1 res }
24705-
ext/package.pimpedContext[SC] def fillCircle(x: Double, y: Double, r: Double) = { prepCircle(x, y, r) ctx.fill() }
24706-
ext/package.pimpedContext[SC] def fillPath(points: (Double, Double)*) = { prepPath(points) ctx.fill() }
24707-
ext/package.pimpedContext[SC] def prepCircle(x: Double, y: Double, r: Double) = { ctx.beginPath() ctx.arc(x, y, r, 0, math.Pi * 2) }
24708-
ext/package.pimpedContext[SC] def prepPath(points: Seq[(Double, Double)], closed: Boolean = true) = { ctx.beginPath() if (closed) ctx.moveTo(points.last._1, points.last._2) for (p <- points) { ctx.lineTo(p._1, p._2) } }
24709-
ext/package.pimpedContext[SC] def strokeCircle(x: Double, y: Double, r: Double) = { prepCircle(x, y, r) ctx.stroke() }
24710-
ext/package.pimpedContext[SC] def strokePath(points: (Double, Double)*) = { prepPath(points) ctx.stroke() }
24711-
ext/package.pimpedContext[SC] def strokePathOpen(points: (Double, Double)*) = { prepPath(points, closed = false) ctx.stroke() }
2471224647
html[SO] type Anchor = HTMLAnchorElement
2471324648
html[SO] type Area = HTMLAreaElement
2471424649
html[SO] type Audio = HTMLAudioElement

api-reports/2_13.txt

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -24183,31 +24183,11 @@ ext/Ajax.InputData[SO] implicit def byteBuffer2ajax(data: ByteBuffer): InputData
2418324183
ext/Ajax.InputData[SO] implicit def formdata2ajax(b: FormData): InputData
2418424184
ext/Ajax.InputData[SO] implicit def str2ajax(s: String): InputData
2418524185
ext/AjaxException[SC] def isTimeout = xhr.status = = 0 && xhr.readyState = = 4
24186-
ext/Color[SC] def *(c: Color) = Color(r * c.r, g * c.g, b * c.b)
24187-
ext/Color[SC] def +(c: Color) = Color(r + c.r, g + c.g, b + c.b)
24188-
ext/Color[SC] def toHex: String
24189-
ext/Color[SC] override def toString() = s"rgb($r, $g, $b)"
24190-
ext/Color[SO] val Black = Color(0, 0, 0)
24191-
ext/Color[SO] val Blue = Color(0, 0, 255)
24192-
ext/Color[SO] val Cyan = Color(0, 255, 255)
24193-
ext/Color[SO] val Green = Color(0, 255, 0)
24194-
ext/Color[SO] val LongHex = s"#($d$d)($d$d)($d$d)".r
24195-
ext/Color[SO] val Magenta = Color(255, 0, 255)
24196-
ext/Color[SO] val RGB = "rgb\\((\\d+), (\\d+), (\\d+)\\)".r
24197-
ext/Color[SO] val Red = Color(255, 0, 0)
24198-
ext/Color[SO] val ShortHex = s"#($d)($d)($d)".r
24199-
ext/Color[SO] val White = Color(255, 255, 255)
24200-
ext/Color[SO] val Yellow = Color(255, 255, 0)
24201-
ext/Color[SO] val all = Seq( White, Red, Green, Blue, Cyan, Magenta, Yellow, Black )
24202-
ext/Color[SO] def apply(s: String): Color
24203-
ext/Color[SO] val d = "[0-9a-zA-Z]"
24204-
ext/Color[SO] def hex(x: String) = Integer.parseInt(x, 16)
2420524186
ext/EasySeq[SC] def apply(x: Int) = jsApply(x)
2420624187
ext/EasySeq[SC] def hasNext: scala.Boolean
2420724188
ext/EasySeq[SC] def iterator = new Iterator[T] { var index = 0 def hasNext: scala.Boolean = index < jsLength def next() = { val res = jsApply(index) index + = 1 res } }
2420824189
ext/EasySeq[SC] def length = jsLength
2420924190
ext/EasySeq[SC] def next() = { val res = jsApply(index) index + = 1 res }
24210-
ext/Image[SO] def createBase64Svg(s: String) = { val img = dom.document.createElement("img").asInstanceOf[html.Image] img.src = "data:image/svg+xml;base64, " + s img }
2421124191
ext/KeyCode[SO] final val A = 65
2421224192
ext/KeyCode[SO] final val Alt = 18
2421324193
ext/KeyCode[SO] final val B = 66
@@ -24635,12 +24615,6 @@ ext/KeyValue.Multimedia[SO] final val SpellCheck = "SpellCheck"
2463524615
ext/KeyValue.Multimedia[SO] final val VolumeDown = "VolumeDown"
2463624616
ext/KeyValue.Multimedia[SO] final val VolumeMute = "VolumeMute"
2463724617
ext/KeyValue.Multimedia[SO] final val VolumeUp = "VolumeUp"
24638-
ext/LocalStorage[SO] def apply(key: String): Option[String]
24639-
ext/LocalStorage[SO] def clear(): Unit
24640-
ext/LocalStorage[SO] def key(index: Int): Option[String]
24641-
ext/LocalStorage[SO] def length: Int
24642-
ext/LocalStorage[SO] def remove(key: String): Unit
24643-
ext/LocalStorage[SO] def update(key: String, data: String): Unit
2464424618
ext/NamedNodeMapMap[SC] override def addOne(kv: (String, Attr)): this.type
2464524619
ext/NamedNodeMapMap[SC] override def clear(): Unit
2464624620
ext/NamedNodeMapMap[SC] override def get(key: String): Option[Attr]
@@ -24649,39 +24623,7 @@ ext/NamedNodeMapMap[SC] override def iterator: Iterator[(String, Attr)]
2464924623
ext/NamedNodeMapMap[SC] def length: Int
2465024624
ext/NamedNodeMapMap[SC] override def next(): (String, Attr)
2465124625
ext/NamedNodeMapMap[SC] override def subtractOne(key: String): this.type
24652-
ext/SessionStorage[SO] def apply(key: String): Option[String]
24653-
ext/SessionStorage[SO] def clear(): Unit
24654-
ext/SessionStorage[SO] def key(index: Int): Option[String]
24655-
ext/SessionStorage[SO] def length: Int
24656-
ext/SessionStorage[SO] def remove(key: String): Unit
24657-
ext/SessionStorage[SO] def update(key: String, data: String): Unit
24658-
ext/Storage[SC] def apply(key: String): Option[String]
24659-
ext/Storage[SC] def clear(): Unit
24660-
ext/Storage[SC] def key(index: Int): Option[String]
24661-
ext/Storage[SC] def length: Int
24662-
ext/Storage[SC] def remove(key: String): Unit
24663-
ext/Storage[SC] def update(key: String, data: String): Unit
24664-
ext/TouchEvents[JT] var ontouchcancel: js.Function1[dom.TouchEvent, _]
24665-
ext/TouchEvents[JT] var ontouchend: js.Function1[dom.TouchEvent, _]
24666-
ext/TouchEvents[JT] var ontouchmove: js.Function1[dom.TouchEvent, _]
24667-
ext/TouchEvents[JT] var ontouchstart: js.Function1[dom.TouchEvent, _]
24668-
ext/TouchEvents[SO] implicit def HTMLDocumentToTouchEvents(html: dom.HTMLDocument): TouchEvents
24669-
ext/TouchEvents[SO] implicit def WindowToTouchEvents(window: dom.Window): TouchEvents
24670-
ext/package[SO] def cast[T] = x.asInstanceOf[T]
24671-
ext/package[SO] implicit def color2String(c: Color): String
24672-
ext/package[SO] def fillCircle(x: Double, y: Double, r: Double) = { prepCircle(x, y, r) ctx.fill() }
24673-
ext/package[SO] def fillPath(points: (Double, Double)*) = { prepPath(points) ctx.fill() }
24674-
ext/package[SO] implicit def pimpAnimatedLength(x: svg.AnimatedLength): Double
24675-
ext/package[SO] implicit def pimpAnimatedNumber(x: svg.AnimatedNumber): Double
2467624626
ext/package[SO] implicit def pimpNamedNodeMap(namedNodeMap: NamedNodeMap): NamedNodeMapMap
24677-
ext/package[SO] implicit def pimpRichAnimatedLength(x: svg.AnimatedLength): runtime.RichDouble
24678-
ext/package[SO] implicit def pimpRichAnimatedNumber(x: svg.AnimatedNumber): runtime.RichDouble
24679-
ext/package[SO] def prepCircle(x: Double, y: Double, r: Double) = { ctx.beginPath() ctx.arc(x, y, r, 0, math.Pi * 2) }
24680-
ext/package[SO] def prepPath(points: Seq[(Double, Double)], closed: Boolean = true) = { ctx.beginPath() if (closed) ctx.moveTo(points.last._1, points.last._2) for (p <- points) { ctx.lineTo(p._1, p._2) } }
24681-
ext/package[SO] def strokeCircle(x: Double, y: Double, r: Double) = { prepCircle(x, y, r) ctx.stroke() }
24682-
ext/package[SO] def strokePath(points: (Double, Double)*) = { prepPath(points) ctx.stroke() }
24683-
ext/package[SO] def strokePathOpen(points: (Double, Double)*) = { prepPath(points, closed = false) ctx.stroke() }
24684-
ext/package.Castable[SC] def cast[T] = x.asInstanceOf[T]
2468524627
ext/package.PimpedHtmlCollection[SC] def apply(x: Int) = jsApply(x)
2468624628
ext/package.PimpedHtmlCollection[SC] def hasNext: scala.Boolean
2468724629
ext/package.PimpedHtmlCollection[SC] def iterator = new Iterator[T] { var index = 0 def hasNext: scala.Boolean = index < jsLength def next() = { val res = jsApply(index) index + = 1 res } }
@@ -24702,13 +24644,6 @@ ext/package.PimpedTouchList[SC] def hasNext: scala.Boolean
2470224644
ext/package.PimpedTouchList[SC] def iterator = new Iterator[T] { var index = 0 def hasNext: scala.Boolean = index < jsLength def next() = { val res = jsApply(index) index + = 1 res } }
2470324645
ext/package.PimpedTouchList[SC] def length = jsLength
2470424646
ext/package.PimpedTouchList[SC] def next() = { val res = jsApply(index) index + = 1 res }
24705-
ext/package.pimpedContext[SC] def fillCircle(x: Double, y: Double, r: Double) = { prepCircle(x, y, r) ctx.fill() }
24706-
ext/package.pimpedContext[SC] def fillPath(points: (Double, Double)*) = { prepPath(points) ctx.fill() }
24707-
ext/package.pimpedContext[SC] def prepCircle(x: Double, y: Double, r: Double) = { ctx.beginPath() ctx.arc(x, y, r, 0, math.Pi * 2) }
24708-
ext/package.pimpedContext[SC] def prepPath(points: Seq[(Double, Double)], closed: Boolean = true) = { ctx.beginPath() if (closed) ctx.moveTo(points.last._1, points.last._2) for (p <- points) { ctx.lineTo(p._1, p._2) } }
24709-
ext/package.pimpedContext[SC] def strokeCircle(x: Double, y: Double, r: Double) = { prepCircle(x, y, r) ctx.stroke() }
24710-
ext/package.pimpedContext[SC] def strokePath(points: (Double, Double)*) = { prepPath(points) ctx.stroke() }
24711-
ext/package.pimpedContext[SC] def strokePathOpen(points: (Double, Double)*) = { prepPath(points, closed = false) ctx.stroke() }
2471224647
html[SO] type Anchor = HTMLAnchorElement
2471324648
html[SO] type Area = HTMLAreaElement
2471424649
html[SO] type Audio = HTMLAudioElement

src/main/scala/org/scalajs/dom/ext/Extensions.scala

Lines changed: 1 addition & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package org.scalajs.dom.ext
22

33
import java.nio.ByteBuffer
44
import org.scalajs.dom
5-
import org.scalajs.dom.{Blob, FormData, KeyboardEvent, html}
5+
import org.scalajs.dom.{Blob, FormData, KeyboardEvent}
66
import scala.concurrent.{Future, Promise}
77
import scala.language.implicitConversions
88
import scala.scalajs.js
@@ -33,66 +33,6 @@ class EasySeq[T](jsLength: Int, jsApply: Int => T)
3333
}
3434
}
3535

36-
/**
37-
* Encapsulates a Color, allowing you to do useful work with it
38-
* before serializing it to a String
39-
*/
40-
case class Color(r: Int, g: Int, b: Int) {
41-
override def toString() = s"rgb($r, $g, $b)"
42-
43-
def toHex: String = f"#$r%02x$g%02x$b%02x"
44-
45-
def *(c: Color) = Color(r * c.r, g * c.g, b * c.b)
46-
47-
def +(c: Color) = Color(r + c.r, g + c.g, b + c.b)
48-
}
49-
50-
object Color {
51-
52-
val d = "[0-9a-zA-Z]"
53-
val RGB = "rgb\\((\\d+), (\\d+), (\\d+)\\)".r
54-
val ShortHex = s"#($d)($d)($d)".r
55-
val LongHex = s"#($d$d)($d$d)($d$d)".r
56-
57-
def hex(x: String) = Integer.parseInt(x, 16)
58-
59-
def apply(s: String): Color = {
60-
s match {
61-
case RGB(r, g, b) => Color(r.toInt, g.toInt, b.toInt)
62-
case ShortHex(r, g, b) => Color(hex(r) * 16, hex(g) * 16, hex(b) * 16)
63-
case LongHex(r, g, b) => Color(hex(r), hex(g), hex(b))
64-
}
65-
}
66-
67-
val White = Color(255, 255, 255)
68-
val Red = Color(255, 0, 0)
69-
val Green = Color(0, 255, 0)
70-
val Blue = Color(0, 0, 255)
71-
val Cyan = Color(0, 255, 255)
72-
val Magenta = Color(255, 0, 255)
73-
val Yellow = Color(255, 255, 0)
74-
val Black = Color(0, 0, 0)
75-
val all = Seq(
76-
White,
77-
Red,
78-
Green,
79-
Blue,
80-
Cyan,
81-
Magenta,
82-
Yellow,
83-
Black
84-
)
85-
}
86-
87-
object Image {
88-
def createBase64Svg(s: String) = {
89-
val img = dom.document.createElement("img").asInstanceOf[html.Image]
90-
91-
img.src = "data:image/svg+xml;base64," + s
92-
img
93-
}
94-
}
95-
9636
/**
9737
* A list of the codes returned by KeyEvents.
9838
*/
@@ -277,81 +217,3 @@ object Ajax {
277217
promise.future
278218
}
279219
}
280-
281-
/**
282-
* Wraps [[dom.Storage]] replacing null-returning methods with option-returning ones
283-
*/
284-
sealed class Storage(domStorage: dom.Storage) {
285-
def length: Int = domStorage.length
286-
287-
def apply(key: String): Option[String] = Option(domStorage.getItem(key))
288-
289-
def update(key: String, data: String): Unit = domStorage.setItem(key, data)
290-
291-
def clear(): Unit = domStorage.clear()
292-
293-
def remove(key: String): Unit = domStorage.removeItem(key)
294-
295-
def key(index: Int): Option[String] = Option(domStorage.key(index))
296-
}
297-
298-
object SessionStorage extends Storage(dom.window.sessionStorage)
299-
300-
object LocalStorage extends Storage(dom.window.localStorage)
301-
302-
/**
303-
* W3C recommendation for touch events
304-
*
305-
* @see http://www.w3.org/TR/touch-events/
306-
*/
307-
@js.native
308-
trait TouchEvents extends js.Object {
309-
310-
/**
311-
* The touchstart event is fired when a touch point is placed on the touch
312-
* surface.
313-
*
314-
* MDN
315-
*/
316-
var ontouchstart: js.Function1[dom.TouchEvent, _] = js.native
317-
318-
/**
319-
* The touchmove event is fired when a touch point is moved along the touch
320-
* surface.
321-
*
322-
* MDN
323-
*/
324-
var ontouchmove: js.Function1[dom.TouchEvent, _] = js.native
325-
326-
/**
327-
* The touchend event is fired when a touch point is removed from the touch
328-
* surface.
329-
*
330-
* MDN
331-
*/
332-
var ontouchend: js.Function1[dom.TouchEvent, _] = js.native
333-
334-
/**
335-
* The touchcancel event is fired when a touch point has been disrupted in an
336-
* implementation-specific manner (too many touch points for example).
337-
*
338-
* MDN
339-
*/
340-
var ontouchcancel: js.Function1[dom.TouchEvent, _] = js.native
341-
}
342-
343-
/**
344-
* Implicits to add touch event handlers to [[dom.HTMLDocument]] and
345-
* [[dom.Window]].
346-
*
347-
* @note Touch events may not be available on all modern browsers. See
348-
* http://www.quirksmode.org/mobile/tableTouch.html#t00 for a compatibility
349-
* table.
350-
*/
351-
object TouchEvents {
352-
implicit def HTMLDocumentToTouchEvents(html: dom.HTMLDocument): TouchEvents =
353-
html.asInstanceOf[TouchEvents]
354-
355-
implicit def WindowToTouchEvents(window: dom.Window): TouchEvents =
356-
window.asInstanceOf[TouchEvents]
357-
}

0 commit comments

Comments
 (0)