dependabot[bot] dab7914eab
Bump @justinribeiro/lite-youtube from 0.9.0 to 0.9.1 in /build/javascript (#273)
* Commit updated Javascript packages

* Bump preact from 10.5.4 to 10.5.5 in /build/javascript (#265)

* Trying a new github workflow to install javascript packages

* Bump tailwindcss from 1.9.2 to 1.9.4 in /build/javascript (#266)

Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 1.9.2 to 1.9.4.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v1.9.2...v1.9.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Commit updated Javascript packages

* Bump preact from 10.5.4 to 10.5.5 in /build/javascript

Bumps [preact](https://github.com/preactjs/preact) from 10.5.4 to 10.5.5.
- [Release notes](https://github.com/preactjs/preact/releases)
- [Commits](https://github.com/preactjs/preact/compare/10.5.4...10.5.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Gabe Kangas <gabek@real-ity.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Owncast <owncast@owncast.online>

* Bump @justinribeiro/lite-youtube in /build/javascript

Bumps [@justinribeiro/lite-youtube](https://github.com/justinribeiro/lite-youtube) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/justinribeiro/lite-youtube/releases)
- [Commits](https://github.com/justinribeiro/lite-youtube/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: Owncast <owncast@owncast.online>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gabe Kangas <gabek@real-ity.com>
2020-10-20 15:15:56 -07:00

157 lines
3.7 KiB
OCaml

type Comment := {
data: String,
length: Number,
nodeName: "#comment",
nodeType: 8,
nodeValue: String,
ownerDoucment: null | Document,
toString: (this: Comment) => String
}
type DOMText := {
data: String,
type: "DOMTextNode",
length: Number,
nodeType: 3,
toString: (this: DOMText) => String,
replaceChild: (
this: DOMText,
index: Number,
length: Number,
value: String
) => void
}
type DOMNode := DOMText | DOMElement | DocumentFragment
type DOMChild := DOMText | DOMElement
type DOMElement := {
tagName: String,
className: String,
dataset: Object<String, Any>,
childNodes: Array<DOMChild>,
parentNode: null | DOMElement,
style: Object<String, String>,
type: "DOMElement",
nodeType: 1,
ownerDoucment: null | Document,
namespaceURI: null | String,
appendChild: (this: DOMElement, child: DOMChild) => DOMChild,
replaceChild:(
this: DOMElement,
elem: DOMChild,
needle: DOMChild
) => DOMChild,
removeChild: (this: DOMElement, child: DOMChild) => DOMChild,
insertBefore: (
this: DOMElement,
elem: DOMChild,
needle: DOMChild | null | undefined
) => DOMChild,
addEventListener: addEventListener,
dispatchEvent: dispatchEvent,
focus: () => void,
toString: (this: DOMElement) => String,
getElementsByClassName: (
this: DOMElement,
className: String
) => Array<DOMElement>,
getElementsByTagName: (
this: DOMElement,
tagName: String
) => Array<DOMElement>,
}
type DocumentFragment := {
childNodes: Array<DOMChild>,
parentNode: null | DOMElement,
type: "DocumentFragment",
nodeType: 11,
nodeName: "#document-fragment",
ownerDoucment: Document | null,
appendChild: (this: DocumentFragment, child: DOMChild),
replaceChild:
(this: DocumentFragment, elem: DOMChild, needle: DOMChild),
removeChild: (this: DocumentFragment, child: DOMChild),
toString: (this: DocumentFragment) => String
}
type Document := {
body: DOMElement,
childNodes: Array<DOMChild>,
documentElement: DOMElement,
nodeType: 9,
createComment: (this: Document, data: String) => Commment,
createTextNode: (this: Document, value: String) => DOMText,
createElement: (this: Document, tagName: String) => DOMElement,
createElementNS: (
this: Document,
namespace: String | null,
tagName: String
) => DOMElement,
createDocumentFragment: (this: Document) => DocumentFragment,
createEvent: () => Event,
getElementById: (
this: Document,
id: String,
) => null | DOMElement,
getElementsByClassName: (
this: Document,
className: String
) => Array<DOMElement>,
getElementsByTagName: (
this: Document,
tagName: String
) => Array<DOMElement>
}
type Event := {
type: String,
bubbles: Boolean,
cancelable: Boolean,
initEvent: (
this: Event,
type: String,
bubbles: Boolean,
cancelable: Boolean
) => void
}
type addEventListener := (
this: DOMElement,
type: String,
listener: Listener
) => void
type dispatchEvent := (
this: DOMElement,
ev: Event
)
min-document/event/add-event-listener := addEventListener
min-document/event/dispatch-event := dispatchEvent
min-document/document := () => Document
min-document/dom-element :=
(tagName: String, owner?: Document, namespace?: String | null) => DOMElement
min-document/dom-fragment :=
(owner?: Document) => DocumentFragment
min-document/dom-text :=
(value: String, owner?: Document) => DOMText
min-document/event := () => Event
min-document/serialize := (DOMElement) => String
min-document := Document