Skip to content

Commit

Permalink
Update declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
turansky committed Oct 15, 2023
1 parent 3f9c544 commit 855d98d
Show file tree
Hide file tree
Showing 57 changed files with 203 additions and 203 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/**
* Events providing information related to animations.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent)
*/
external interface AnimationEventInit : EventInit {
var animationName: String?
var elapsedTime: Double?
var pseudoElement: String?
}

/**
* Events providing information related to animations.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationEvent)
*/
open external class AnimationEvent(
override val type: EventType<AnimationEvent>,
init: AnimationEventInit = definedExternally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationPlaybackEvent) */
external interface AnimationPlaybackEventInit : EventInit {
var currentTime: CSSNumberish?
var timelineTime: CSSNumberish?
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnimationPlaybackEvent) */
open external class AnimationPlaybackEvent(
override val type: EventType<AnimationPlaybackEvent>,
init: AnimationPlaybackEventInit = definedExternally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

external interface OfflineAudioCompletionEventInit : EventInit {
var renderedBuffer: AudioBuffer
}

/**
* The Web Audio API OfflineAudioCompletionEvent interface represents events that occur when the processing of an OfflineAudioContext is terminated. The complete event implements this interface.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/OfflineAudioCompletionEvent)
*/
external interface OfflineAudioCompletionEventInit : EventInit {
var renderedBuffer: AudioBuffer
}

open external class OfflineAudioCompletionEvent(
override val type: EventType<OfflineAudioCompletionEvent>,
init: OfflineAudioCompletionEventInit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

external interface ClipboardEventInit : EventInit {
var clipboardData: DataTransfer?
}

/**
* Events providing information related to modification of the clipboard, that is cut, copy, and paste events.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ClipboardEvent)
*/
external interface ClipboardEventInit : EventInit {
var clipboardData: DataTransfer?
}

open external class ClipboardEvent(
override val type: EventType<ClipboardEvent>,
init: ClipboardEventInit = definedExternally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/**
* Inherits from Event, and represents the event object of an event sent on a document or worker when its content security policy is violated.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent)
*/
external interface SecurityPolicyViolationEventInit : EventInit {
var blockedURI: String?
var columnNumber: Int?
Expand All @@ -30,6 +25,11 @@ external interface SecurityPolicyViolationEventInit : EventInit {
var violatedDirective: String
}

/**
* Inherits from Event, and represents the event object of an event sent on a document or worker when its content security policy is violated.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent)
*/
open external class SecurityPolicyViolationEvent(
override val type: EventType<SecurityPolicyViolationEvent>,
init: SecurityPolicyViolationEventInit = definedExternally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaQueryListEvent) */
external interface MediaQueryListEventInit : EventInit {
var matches: Boolean?
var media: MediaQuery?
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaQueryListEvent) */
open external class MediaQueryListEvent(
override val type: EventType<MediaQueryListEvent>,
init: MediaQueryListEventInit = definedExternally,
Expand Down
10 changes: 5 additions & 5 deletions browser-kotlin/src/jsMain/kotlin/web/cssom/TransitionEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/**
* Events providing information related to transitions.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent)
*/
external interface TransitionEventInit : EventInit {
var elapsedTime: Double?
var propertyName: String?
var pseudoElement: String?
}

/**
* Events providing information related to transitions.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransitionEvent)
*/
open external class TransitionEvent(
override val type: EventType<TransitionEvent>,
init: TransitionEventInit = definedExternally,
Expand Down
12 changes: 6 additions & 6 deletions browser-kotlin/src/jsMain/kotlin/web/device/DeviceMotionEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/**
* The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent)
*/
external interface DeviceMotionEventInit : EventInit {
var acceleration: DeviceMotionEventAccelerationInit?
var accelerationIncludingGravity: DeviceMotionEventAccelerationInit?
var interval: Double?
var rotationRate: DeviceMotionEventRotationRateInit?
}

/**
* The DeviceMotionEvent provides web developers with information about the speed of changes for the device's position and orientation.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceMotionEvent)
*/
open external class DeviceMotionEvent(
override val type: EventType<DeviceMotionEvent>,
init: DeviceMotionEventInit = definedExternally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/**
* The DeviceOrientationEvent provides web developers with information from the physical orientation of the device running the web page.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceOrientationEvent)
*/
external interface DeviceOrientationEventInit : EventInit {
var absolute: Boolean?
var alpha: Double?
var beta: Double?
var gamma: Double?
}

/**
* The DeviceOrientationEvent provides web developers with information from the physical orientation of the device running the web page.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DeviceOrientationEvent)
*/
open external class DeviceOrientationEvent(
override val type: EventType<DeviceOrientationEvent>,
init: DeviceOrientationEventInit = definedExternally,
Expand Down
10 changes: 5 additions & 5 deletions browser-kotlin/src/jsMain/kotlin/web/errors/ErrorEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/**
* Events providing information related to errors in scripts or in files.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
*/
external interface ErrorEventInit : EventInit {
var colno: Int?
var error: Any?
Expand All @@ -23,6 +18,11 @@ external interface ErrorEventInit : EventInit {
var message: String?
}

/**
* Events providing information related to errors in scripts or in files.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
*/
open external class ErrorEvent(
override val type: EventType<ErrorEvent>,
init: ErrorEventInit = definedExternally,
Expand Down
10 changes: 5 additions & 5 deletions browser-kotlin/src/jsMain/kotlin/web/events/ProgressEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ package web.events

import js.core.JsLong

/**
* Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>).
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ProgressEvent)
*/
external interface ProgressEventInit : EventInit {
var lengthComputable: Boolean?
var loaded: JsLong?
var total: JsLong?
}

/**
* Events measuring progress of an underlying process, like an HTTP request (for an XMLHttpRequest, or the loading of the underlying resource of an <img>, <audio>, <video>, <style> or <link>).
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ProgressEvent)
*/
open external class ProgressEvent<out T : EventTarget>(
override val type: EventType<ProgressEvent<T>>,
init: ProgressEventInit = definedExternally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */
external interface FontFaceSetLoadEventInit : EventInit {
var fontfaces: ReadonlyArray<FontFace>?
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FontFaceSetLoadEvent) */
open external class FontFaceSetLoadEvent(
override val type: EventType<FontFaceSetLoadEvent>,
init: FontFaceSetLoadEventInit = definedExternally,
Expand Down
8 changes: 4 additions & 4 deletions browser-kotlin/src/jsMain/kotlin/web/gamepad/GamepadEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

external interface GamepadEventInit : EventInit {
var gamepad: Gamepad
}

/**
* This Gamepad API interface contains references to gamepads connected to the system, which is what the gamepad events Window.gamepadconnected and Window.gamepaddisconnected are fired in response to.
* Available only in secure contexts.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GamepadEvent)
*/
external interface GamepadEventInit : EventInit {
var gamepad: Gamepad
}

open external class GamepadEvent(
override val type: EventType<GamepadEvent>,
init: GamepadEventInit,
Expand Down
10 changes: 5 additions & 5 deletions browser-kotlin/src/jsMain/kotlin/web/history/HashChangeEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/**
* Events that fire when the fragment identifier of the URL has changed.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HashChangeEvent)
*/
external interface HashChangeEventInit : EventInit {
var newURL: String?
var oldURL: String?
}

/**
* Events that fire when the fragment identifier of the URL has changed.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/HashChangeEvent)
*/
open external class HashChangeEvent(
override val type: EventType<HashChangeEvent>,
init: HashChangeEventInit = definedExternally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

external interface PageTransitionEventInit : EventInit {
var persisted: Boolean?
}

/**
* The PageTransitionEvent is fired when a document is being loaded or unloaded.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PageTransitionEvent)
*/
external interface PageTransitionEventInit : EventInit {
var persisted: Boolean?
}

open external class PageTransitionEvent(
override val type: EventType<PageTransitionEvent>,
init: PageTransitionEventInit = definedExternally,
Expand Down
8 changes: 4 additions & 4 deletions browser-kotlin/src/jsMain/kotlin/web/history/PopStateEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

external interface PopStateEventInit : EventInit {
var state: Any?
}

/**
* PopStateEvent is an event handler for the popstate event on the window.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PopStateEvent)
*/
external interface PopStateEventInit : EventInit {
var state: Any?
}

open external class PopStateEvent(
override val type: EventType<PopStateEvent>,
init: PopStateEventInit = definedExternally,
Expand Down
2 changes: 1 addition & 1 deletion browser-kotlin/src/jsMain/kotlin/web/html/FormDataEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import web.events.EventInit
import web.events.EventType
import web.http.FormData

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormDataEvent) */
external interface FormDataEventInit : EventInit {
var formData: FormData
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormDataEvent) */
open external class FormDataEvent(
override val type: EventType<FormDataEvent>,
init: FormDataEventInit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaEncryptedEvent) */
external interface MediaEncryptedEventInit : EventInit {
var initData: ArrayBuffer?
var initDataType: String?
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaEncryptedEvent) */
open external class MediaEncryptedEvent(
override val type: EventType<MediaEncryptedEvent>,
init: MediaEncryptedEventInit = definedExternally,
Expand Down
2 changes: 1 addition & 1 deletion browser-kotlin/src/jsMain/kotlin/web/html/SubmitEvent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubmitEvent) */
external interface SubmitEventInit : EventInit {
var submitter: HTMLElement?
}

/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubmitEvent) */
open external class SubmitEvent(
override val type: EventType<SubmitEvent>,
init: SubmitEventInit = definedExternally,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import web.events.Event
import web.events.EventInit
import web.events.EventType

/**
* This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBVersionChangeEvent)
*/
external interface IDBVersionChangeEventInit : EventInit {
var newVersion: JsLong?
var oldVersion: JsLong?
}

/**
* This IndexedDB API interface indicates that the version of the database has changed, as the result of an IDBOpenDBRequest.onupgradeneeded event handler function.
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBVersionChangeEvent)
*/
open external class IDBVersionChangeEvent(
override val type: EventType<IDBVersionChangeEvent>,
init: IDBVersionChangeEventInit = definedExternally,
Expand Down
Loading

0 comments on commit 855d98d

Please sign in to comment.