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

Change Badge from interface to namespace #38

Merged
merged 3 commits into from
Jul 7, 2019
Merged

Conversation

marcoscaceres
Copy link
Member

@marcoscaceres marcoscaceres commented Jul 3, 2019

closes #9
closes #14


Preview | Diff

@fallaciousreasoning
Copy link
Collaborator

This LGTM :)

@marcoscaceres
Copy link
Member Author

@domenic, this is my first ever attempt at defining a namespace 🐣... anything else we would need to spec that's different from an interface definition?

Copy link

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needs [Exposed].

@marcoscaceres marcoscaceres marked this pull request as ready for review July 4, 2019 03:11
@marcoscaceres
Copy link
Member Author

Ah, yeah of course. Added Exposed back.

Copy link

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I would also change all "X method"s to "X function"s. (Both are Web IDL "operations", but you are doing the nice thing for web devs and using the normal JavaScript name, which with this change would now be function.)

@marcoscaceres
Copy link
Member Author

I wondered about that... I was mostly following the naming form the console API, which calls them "methods". Don't feel strongly about changing it, but my working assumption is: if the operations attached to an object, then it's a "method" on that object. Otherwise, it's a standalone operations, so it's a "function".

@domenic
Copy link

domenic commented Jul 5, 2019

Good point, we should fix console. (Methods are this dependent, but the functions attached to namespaces are not this dependent.)

@marcoscaceres
Copy link
Member Author

Sounds good. I'll update this PR.

@fallaciousreasoning
Copy link
Collaborator

Feel free to merge :)

@marcoscaceres marcoscaceres merged commit 4cb3214 into master Jul 7, 2019
@marcoscaceres marcoscaceres deleted the namespace branch July 7, 2019 23:54
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.

Attach to navigator instead? API surface: namespace vs. class with static methods
3 participants