purescript-web/purescript-web-html

Duplication with Web.DOM.Element

Closed this issue · 4 comments

It appears that Web.HTML.HTMLElement.setClassName is unnecessary when we have Web.DOM.Element.setClassName.

I haven't checked if there are other duplicated functions.

Loosely related to #29

I think this is reasonable to implement as part of the 0.14 changes, as well as other functions which really ought to live in Web.DOM (see #10 as well).

Any suggestions on a good plan of attack for this issue?

Thinking the first step should be to find all the duplicates. Could start with a simple search for duplicated function names across libraries. Could get more advanced by searching for duplicate type signatures (with necessary substitutions, e.g. Element vs HTMLElement).

Should probably include deprecation warnings too.

garyb commented

I imagine looking at what the module exports compared with the IDL in the spec is probably the "safest" way of doing it. Plus we could make a note of anything that is missing at the same time.

As with all these libraries it's just a tedious and rather error-prone manual slog 🙁

We may not be able to get this in for 0.14 due to a backlog of other work, so I'm going to remove the label. We can still do this as part of a subsequent set of breaking updates to the web organization updating some of these modules.