Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Rename htmlElementRe #69

Closed
bloodyowl opened this issue Jun 16, 2017 · 5 comments
Closed

Rename htmlElementRe #69

bloodyowl opened this issue Jun 16, 2017 · 5 comments

Comments

@bloodyowl
Copy link
Contributor

Given that the spec calls this DocumentElement and that HTMLElement is something else, this is very confusing. Don't you think renaming the module DocumentElement would help make it easier?

@glennsl
Copy link
Member

glennsl commented Jun 17, 2017

You lost me. Where does the spec call it DocumentElement?

@bloodyowl
Copy link
Contributor Author

Here HtmlElement is elements with a html tag: https://github.com/BuckleTypes/bs-webapi-incubator/blob/master/src/dom/html/htmlElementRe.re#L4-L5

My bad, the spec calls it HTMLHtmlElement, I got confused because it its often referred to as document.documentElement.

Although, in the spec, HTMLElement is a subclass of Element https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement, which is hard to disambiguate here with the bs-webapi naming

@glennsl
Copy link
Member

glennsl commented Jun 17, 2017

Which are hard to disambiguate? HTMLElement is both a subtype of and inherits the implementation of Element in bs-webapi.

@bloodyowl
Copy link
Contributor Author

ElementHTMLElementHTMLHtmlElement

@glennsl
Copy link
Member

glennsl commented Jun 17, 2017

Right, yea that certainly isn't unconfusing, but I think we should stick with the spec here, for consistency. These bindings are meant to be pretty low-level, upon which more friendlier APIs can be built, but it's kind of hard to build anything on ground that's full of holes and keeps moving :)

@glennsl glennsl closed this as completed Sep 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants