Skip to content

Add HTMLTemplateDocument #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified JS.fsx
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified Shared.fsx
100644 → 100755
Empty file.
9 changes: 8 additions & 1 deletion TS.fsx
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -545,13 +545,20 @@ let EmitAddedInterface (ai: JsonItems.ItemsType.Root) =
match ai.Extends with
| Some e -> Pt.printl "interface %s extends %s {" ai.Name.Value ai.Extends.Value
| None -> Pt.printl "interface %s {" ai.Name.Value

ai.Properties |> Array.iter (fun p -> Pt.printWithAddedIndent "%s: %s;" p.Name p.Type)
ai.Methods |> Array.collect (fun m -> m.Signatures) |> Array.iter (Pt.printWithAddedIndent "%s;")
ai.Indexer |> Array.collect (fun i -> i.Signatures) |> Array.iter (Pt.printWithAddedIndent "%s;")
Pt.printl "}"
Pt.printl ""

if ai.ConstructorSignatures.Length > 0 then
Pt.printl "declare var %s: {" ai.Name.Value
Pt.printWithAddedIndent "prototype: %s;" ai.Name.Value
ai.ConstructorSignatures |> Array.iter (Pt.printWithAddedIndent "%s;")
Pt.printl "}"
Pt.printl ""

let EmitTheWholeThing flavor (target:TextWriter) =
Pt.reset()
Pt.printl "/////////////////////////////"
Expand Down
9 changes: 9 additions & 0 deletions baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12610,6 +12610,15 @@ interface ProgressEventInit extends EventInit {
total?: number;
}

interface HTMLTemplateElement extends HTMLElement {
content: DocumentFragment;
}

declare var HTMLTemplateElement: {
prototype: HTMLTemplateElement;
new(): HTMLTemplateElement;
}

declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;

interface ErrorEventHandler {
Expand Down
Empty file modified build.cmd
100644 → 100755
Empty file.
Empty file modified build.fsx
100644 → 100755
Empty file.
17 changes: 16 additions & 1 deletion inputfiles/addedTypes.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,20 @@
"interface": "Document",
"name": "currentScript",
"type": "HTMLScriptElement"
}
},
{
"kind": "interface",
"name": "HTMLTemplateElement",
"flavor": "Web",
"extends": "HTMLElement",
"constructorSignatures": [
"new(): HTMLTemplateElement"
],
"properties": [
{
"name": "content",
"type": "DocumentFragment"
}
]
}
]
Empty file modified inputfiles/browser.webidl.xml
100644 → 100755
Empty file.
Empty file modified inputfiles/comments.json
100644 → 100755
Empty file.
Empty file modified inputfiles/jsTemplate.js
100644 → 100755
Empty file.
Empty file modified inputfiles/jsTemplate_worker.js
100644 → 100755
Empty file.
Empty file modified inputfiles/overridingTypes.json
100644 → 100755
Empty file.
Empty file modified inputfiles/removedTypes.json
100644 → 100755
Empty file.
3 changes: 3 additions & 0 deletions inputfiles/sample.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
{
"kind": "interface",
"name": "BlobPropertyBag",
"constructorSignatures": [
"new(): NodeList"
],
"properties": [
{
"name": "type?",
Expand Down
Empty file modified inputfiles/webworkers.specidl.xml
100644 → 100755
Empty file.
Empty file modified paket.dependencies
100644 → 100755
Empty file.
Empty file modified paket.lock
100644 → 100755
Empty file.
Empty file modified sample.xml
100644 → 100755
Empty file.