Skip to content
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

Remove ShadowRoot#innerHTML #660

Closed
wants to merge 1 commit into from

Conversation

falsandtru
Copy link
Contributor

@saschanaz
Copy link
Contributor

saschanaz commented Feb 9, 2019

I intentionally kept it when I did #603 because browsers out there support it and spec authors want to properly spec it.

@falsandtru
Copy link
Contributor Author

I think undocumented proposed APIs shouldn't be added but I'm not sure they should be kept when they are already added.

@saschanaz
Copy link
Contributor

@falsandtru IMO undocumented APIs can stay if they are widely implemented. Recently web folks tend to spec those widespread APIs rather than remove it from browsers.

@falsandtru
Copy link
Contributor Author

But they may be removed.

@saschanaz
Copy link
Contributor

@falsandtru True. When you are not sure, try opening an issue on the relevant web spec. Then the spec authors will discuss what should be done. If they decide to remove it, IMO that's when TSJS-lib-generator removes the API.

@falsandtru
Copy link
Contributor Author

Just to clarify, I mean "added" means "added to declaration files of TypeScript" at #660 (comment).

@saschanaz
Copy link
Contributor

I understood correctly then 😃

My opinion:

  1. It's already in lib.d.ts
  2. It's widely implemented
  3. The spec authors agree to add it to the specification. That means even if we remove it, we'll have to add it again.

So I think it should stay.

@saschanaz
Copy link
Contributor

Hi @falsandtru, the spec just added the official ShadowRoot.innerHTML definition! w3c/DOM-Parsing#42 🎉

Please run npm run fetch-idl -- "DOM Parsing and Serialization" to refresh the IDL 👍

@falsandtru
Copy link
Contributor Author

Why you didn't update http://w3c.github.io/webcomponents/spec/shadow/?

@saschanaz
Copy link
Contributor

saschanaz commented Feb 12, 2019

@falsandtru Read the warning at the top of the spec, that's why I didn't 😆

innerHTML is defined in DOM Parsing and Serialization and so naturally ShadowRoot.innerHTML should go there too.

See also WICG/webcomponents#661.

@falsandtru
Copy link
Contributor Author

I saw such extensional definition style for the first time. Confirmed that spec is used to both Element and ShadowRoot.

@falsandtru falsandtru closed this Feb 12, 2019
@falsandtru falsandtru deleted the ShadowRoot branch February 12, 2019 01:46
@saschanaz
Copy link
Contributor

Would you mind opening a new PR to remove the addedTypes.json item and replace it by the official IDL?

@falsandtru
Copy link
Contributor Author

I've no plan. Your PR wouldn't conflict.

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