Skip to content

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