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

Add HTMLTemplateDocument #19

wants to merge 4 commits into from

Conversation

emilgpa
Copy link
Contributor

@emilgpa emilgpa commented Nov 6, 2015

@emilgpa
Copy link
Contributor Author

emilgpa commented Nov 6, 2015

But I need to add the following, right?:

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

But I don't know how to do it by addedTypes.json... :(

@zhengbli
Copy link
Contributor

@DasHaus I'm adding support for those. Will keep you updated.

@emilgpa
Copy link
Contributor Author

emilgpa commented Nov 10, 2015

👍

@zhengbli
Copy link
Contributor

@DasHaus The new bit is merged in. So to add constructors, you need to add a constructorSignatures string array property to your json object. Also, as this is a DOM type that should not be added to webworker definition, you may want to add a flavor property that has the value Web.

Your added json content should be something like:

    {
        "kind": "interface",
        "name": "HTMLTemplateElement",
        "flavor":  "Web",
        "extends": "HTMLElement",
        "constructorSignatures": [
            "new(): HTMLTemplateElement"
        ],
        "properties": [
            {
                "name": "content",
                "type": "DocumentFragment"
            }
        ]
    }

@emilgpa
Copy link
Contributor Author

emilgpa commented Nov 11, 2015

Something I did wrong ... I'm a newbie with git ... :(

I created a new pull request

@emilgpa emilgpa closed this Nov 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants