Replace trait with interfaces in JavaScript stubs
This commit is contained in:
@@ -30,31 +30,31 @@ native public open class WebGLContextAttributes {
|
||||
var failIfMajorPerformanceCaveat: Boolean = false
|
||||
}
|
||||
|
||||
native public trait WebGLObject {
|
||||
native public interface WebGLObject {
|
||||
}
|
||||
|
||||
native public trait WebGLBuffer : WebGLObject {
|
||||
native public interface WebGLBuffer : WebGLObject {
|
||||
}
|
||||
|
||||
native public trait WebGLFramebuffer : WebGLObject {
|
||||
native public interface WebGLFramebuffer : WebGLObject {
|
||||
}
|
||||
|
||||
native public trait WebGLProgram : WebGLObject {
|
||||
native public interface WebGLProgram : WebGLObject {
|
||||
}
|
||||
|
||||
native public trait WebGLRenderbuffer : WebGLObject {
|
||||
native public interface WebGLRenderbuffer : WebGLObject {
|
||||
}
|
||||
|
||||
native public trait WebGLShader : WebGLObject {
|
||||
native public interface WebGLShader : WebGLObject {
|
||||
}
|
||||
|
||||
native public trait WebGLTexture : WebGLObject {
|
||||
native public interface WebGLTexture : WebGLObject {
|
||||
}
|
||||
|
||||
native public trait WebGLUniformLocation {
|
||||
native public interface WebGLUniformLocation {
|
||||
}
|
||||
|
||||
native public trait WebGLActiveInfo {
|
||||
native public interface WebGLActiveInfo {
|
||||
var size: Int
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -66,7 +66,7 @@ native public trait WebGLActiveInfo {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait WebGLShaderPrecisionFormat {
|
||||
native public interface WebGLShaderPrecisionFormat {
|
||||
var rangeMin: Int
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -78,7 +78,7 @@ native public trait WebGLShaderPrecisionFormat {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait WebGLRenderingContext : RenderingContext {
|
||||
native public interface WebGLRenderingContext : RenderingContext {
|
||||
var canvas: HTMLCanvasElement
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
native public trait MediaList {
|
||||
native public interface MediaList {
|
||||
var mediaText: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -32,7 +32,7 @@ native public trait MediaList {
|
||||
fun deleteMedium(medium: String): Unit = noImpl
|
||||
}
|
||||
|
||||
native public trait StyleSheet {
|
||||
native public interface StyleSheet {
|
||||
var type: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -56,7 +56,7 @@ native public trait StyleSheet {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSStyleSheet : StyleSheet {
|
||||
native public interface CSSStyleSheet : StyleSheet {
|
||||
var ownerRule: CSSRule?
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -67,7 +67,7 @@ native public trait CSSStyleSheet : StyleSheet {
|
||||
fun deleteRule(index: Int): Unit = noImpl
|
||||
}
|
||||
|
||||
native public trait StyleSheetList {
|
||||
native public interface StyleSheetList {
|
||||
var length: Int
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -75,7 +75,7 @@ native public trait StyleSheetList {
|
||||
nativeGetter fun get(index: Int): StyleSheet? = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSRuleList {
|
||||
native public interface CSSRuleList {
|
||||
var length: Int
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -83,7 +83,7 @@ native public trait CSSRuleList {
|
||||
nativeGetter fun get(index: Int): CSSRule? = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSRule {
|
||||
native public interface CSSRule {
|
||||
var type: Short
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -109,7 +109,7 @@ native public trait CSSRule {
|
||||
}
|
||||
}
|
||||
|
||||
native public trait CSSStyleRule : CSSRule {
|
||||
native public interface CSSStyleRule : CSSRule {
|
||||
var selectorText: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -118,7 +118,7 @@ native public trait CSSStyleRule : CSSRule {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSImportRule : CSSRule {
|
||||
native public interface CSSImportRule : CSSRule {
|
||||
var href: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -130,7 +130,7 @@ native public trait CSSImportRule : CSSRule {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSGroupingRule : CSSRule {
|
||||
native public interface CSSGroupingRule : CSSRule {
|
||||
var cssRules: CSSRuleList
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -138,13 +138,13 @@ native public trait CSSGroupingRule : CSSRule {
|
||||
fun deleteRule(index: Int): Unit = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSMediaRule : CSSGroupingRule {
|
||||
native public interface CSSMediaRule : CSSGroupingRule {
|
||||
var media: MediaList
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSPageRule : CSSGroupingRule {
|
||||
native public interface CSSPageRule : CSSGroupingRule {
|
||||
var selectorText: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -153,7 +153,7 @@ native public trait CSSPageRule : CSSGroupingRule {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSMarginRule : CSSRule {
|
||||
native public interface CSSMarginRule : CSSRule {
|
||||
var name: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -162,7 +162,7 @@ native public trait CSSMarginRule : CSSRule {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSNamespaceRule : CSSRule {
|
||||
native public interface CSSNamespaceRule : CSSRule {
|
||||
var namespaceURI: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -171,7 +171,7 @@ native public trait CSSNamespaceRule : CSSRule {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait CSSStyleDeclaration {
|
||||
native public interface CSSStyleDeclaration {
|
||||
var alignContent: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -869,7 +869,7 @@ native public trait CSSStyleDeclaration {
|
||||
fun removeProperty(property: String): String = noImpl
|
||||
}
|
||||
|
||||
native public trait PseudoElement {
|
||||
native public interface PseudoElement {
|
||||
var cascadedStyle: CSSStyleDeclaration
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -884,6 +884,6 @@ native public trait PseudoElement {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait CSS {
|
||||
native public interface CSS {
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ native public open class Event(type: String, eventInitDict: EventInit = noImpl)
|
||||
}
|
||||
}
|
||||
|
||||
native public trait EventTarget {
|
||||
native public interface EventTarget {
|
||||
fun addEventListener(type: String, callback: EventListener?, capture: Boolean = false): Unit = noImpl
|
||||
fun addEventListener(type: String, callback: ((Event) -> Unit)?, capture: Boolean = false): Unit = noImpl
|
||||
fun removeEventListener(type: String, callback: EventListener?, capture: Boolean = false): Unit = noImpl
|
||||
@@ -109,7 +109,7 @@ native public trait EventTarget {
|
||||
fun dispatchEvent(event: Event): Boolean = noImpl
|
||||
}
|
||||
|
||||
native public trait EventListener {
|
||||
native public interface EventListener {
|
||||
fun handleEvent(event: Event): Unit = noImpl
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -51,7 +51,7 @@ native public open class FilePropertyBag {
|
||||
var lastModified: Long
|
||||
}
|
||||
|
||||
native public trait FileList {
|
||||
native public interface FileList {
|
||||
var length: Int
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -105,6 +105,6 @@ native public open class FileReaderSync {
|
||||
fun readAsDataURL(blob: Blob): String = noImpl
|
||||
}
|
||||
|
||||
native public trait URL {
|
||||
native public interface URL {
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.w3c.notifications.*
|
||||
import org.w3c.workers.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
native public trait Performance {
|
||||
native public interface Performance {
|
||||
var timing: PerformanceTiming
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -29,7 +29,7 @@ native public trait Performance {
|
||||
fun now(): Double = noImpl
|
||||
}
|
||||
|
||||
native public trait PerformanceTiming {
|
||||
native public interface PerformanceTiming {
|
||||
var navigationStart: Long
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -95,7 +95,7 @@ native public trait PerformanceTiming {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait PerformanceNavigation {
|
||||
native public interface PerformanceNavigation {
|
||||
var type: Short
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.xhr.*
|
||||
|
||||
native public trait ServiceWorkerRegistration : EventTarget {
|
||||
native public interface ServiceWorkerRegistration : EventTarget {
|
||||
var installing: ServiceWorker?
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -45,7 +45,7 @@ native public trait ServiceWorkerRegistration : EventTarget {
|
||||
fun getNotifications(filter: GetNotificationOptions = noImpl): dynamic = noImpl
|
||||
}
|
||||
|
||||
native public trait ServiceWorkerGlobalScope : WorkerGlobalScope {
|
||||
native public interface ServiceWorkerGlobalScope : WorkerGlobalScope {
|
||||
var clients: Clients
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -73,7 +73,7 @@ native public trait ServiceWorkerGlobalScope : WorkerGlobalScope {
|
||||
fun skipWaiting(): dynamic = noImpl
|
||||
}
|
||||
|
||||
native public trait ServiceWorker : EventTarget, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker {
|
||||
native public interface ServiceWorker : EventTarget, UnionMessagePortOrServiceWorker, UnionClientOrMessagePortOrServiceWorker {
|
||||
var scriptURL: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -92,7 +92,7 @@ native public trait ServiceWorker : EventTarget, UnionMessagePortOrServiceWorker
|
||||
fun postMessage(message: Any?, transfer: Array<Transferable> = noImpl): Unit = noImpl
|
||||
}
|
||||
|
||||
native public trait ServiceWorkerContainer : EventTarget {
|
||||
native public interface ServiceWorkerContainer : EventTarget {
|
||||
var controller: ServiceWorker?
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -144,7 +144,7 @@ native public open class ServiceWorkerMessageEventInit : EventInit() {
|
||||
var ports: Array<MessagePort>
|
||||
}
|
||||
|
||||
native public trait Client : UnionClientOrMessagePortOrServiceWorker {
|
||||
native public interface Client : UnionClientOrMessagePortOrServiceWorker {
|
||||
var url: String
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -157,7 +157,7 @@ native public trait Client : UnionClientOrMessagePortOrServiceWorker {
|
||||
fun postMessage(message: Any?, transfer: Array<Transferable> = noImpl): Unit = noImpl
|
||||
}
|
||||
|
||||
native public trait WindowClient : Client {
|
||||
native public interface WindowClient : Client {
|
||||
var visibilityState: dynamic
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -167,7 +167,7 @@ native public trait WindowClient : Client {
|
||||
fun focus(): dynamic = noImpl
|
||||
}
|
||||
|
||||
native public trait Clients {
|
||||
native public interface Clients {
|
||||
fun matchAll(options: ClientQueryOptions = noImpl): dynamic = noImpl
|
||||
fun openWindow(url: String): dynamic = noImpl
|
||||
fun claim(): dynamic = noImpl
|
||||
@@ -231,7 +231,7 @@ native public open class ExtendableMessageEventInit : ExtendableEventInit() {
|
||||
var ports: Array<MessagePort>
|
||||
}
|
||||
|
||||
native public trait Cache {
|
||||
native public interface Cache {
|
||||
fun match(request: dynamic, options: CacheQueryOptions = noImpl): dynamic = noImpl
|
||||
fun matchAll(request: dynamic = noImpl, options: CacheQueryOptions = noImpl): dynamic = noImpl
|
||||
fun add(request: dynamic): dynamic = noImpl
|
||||
@@ -255,7 +255,7 @@ native public open class CacheBatchOperation {
|
||||
var options: CacheQueryOptions
|
||||
}
|
||||
|
||||
native public trait CacheStorage {
|
||||
native public interface CacheStorage {
|
||||
fun match(request: dynamic, options: CacheQueryOptions = noImpl): dynamic = noImpl
|
||||
fun has(cacheName: String): dynamic = noImpl
|
||||
fun open(cacheName: String): dynamic = noImpl
|
||||
@@ -266,9 +266,9 @@ native public trait CacheStorage {
|
||||
native public open class FunctionalEvent : ExtendableEvent(noImpl, noImpl) {
|
||||
}
|
||||
|
||||
native public marker trait UnionMessagePortOrServiceWorker {
|
||||
native public marker interface UnionMessagePortOrServiceWorker {
|
||||
}
|
||||
|
||||
native public marker trait UnionClientOrMessagePortOrServiceWorker {
|
||||
native public marker interface UnionClientOrMessagePortOrServiceWorker {
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.w3c.notifications.*
|
||||
import org.w3c.performance.*
|
||||
import org.w3c.workers.*
|
||||
|
||||
native public trait XMLHttpRequestEventTarget : EventTarget {
|
||||
native public interface XMLHttpRequestEventTarget : EventTarget {
|
||||
var onloadstart: ((Event) -> dynamic)?
|
||||
get() = noImpl
|
||||
set(value) = noImpl
|
||||
@@ -43,7 +43,7 @@ native public trait XMLHttpRequestEventTarget : EventTarget {
|
||||
set(value) = noImpl
|
||||
}
|
||||
|
||||
native public trait XMLHttpRequestUpload : XMLHttpRequestEventTarget {
|
||||
native public interface XMLHttpRequestUpload : XMLHttpRequestEventTarget {
|
||||
}
|
||||
|
||||
native public open class XMLHttpRequest : XMLHttpRequestEventTarget {
|
||||
|
||||
@@ -87,7 +87,7 @@ fun Appendable.render(allTypes: Map<String, GenerateTraitOrClass>, typeNamesToUn
|
||||
}
|
||||
when (iface.kind) {
|
||||
GenerateDefinitionKind.CLASS -> append("open class ")
|
||||
GenerateDefinitionKind.TRAIT -> append("trait ")
|
||||
GenerateDefinitionKind.TRAIT -> append("interface ")
|
||||
}
|
||||
|
||||
append(iface.name)
|
||||
|
||||
Reference in New Issue
Block a user