Add readyState function for a Document
dgendill opened this issue · 1 comments
dgendill commented
Do you think it would make sense to add a readyState function for a Document? e.g.
data DocumentReadyState
= Loading
| Interactive
| Complete
readyState :: forall e. Document -> Eff (dom :: DOM | e) DocumentReadyStatehttps://www.w3.org/TR/html51/dom.html#the-document-object
https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState
If so, I can probably take a look at doing it, but I'm not exactly sure where I should put the function and sum type. Would DOM.Node.Document be appropriate?
garyb commented
This would indeed be good to have! It should go under DOM.HTML.Document by the looks of it though, as it's in the HTML5 spec rather than the DOM4 spec: https://www.w3.org/TR/html5/dom.html#dom-document-readystate