minor additions to document - #172
Conversation
|
|
||
| [@bs.get] [@bs.return nullable] external activeElement : t_htmlDocument => option(Dom.element) = ""; | ||
| [@bs.get] [@bs.return nullable] external body : t_htmlDocument => option(Dom.element) = ""; /* returns option HTMLBodyElement */ | ||
| [@bs.get] external characterSet : t_htmlDocument => string = ""; |
There was a problem hiding this comment.
Why has this been moved here from Document? The documentation you refer to lists it as a property of Document, and as HtmlDocument inherits everything from Document it should be available here anyway.
There was a problem hiding this comment.
weird, didnt find it. but will remove it from here.
In general i wonder what's the actal distinction between document and htmldocument.
In the docs it means that for all porpuses its the same thing when dealing with the web.
There was a problem hiding this comment.
You have also removed it from Document, and from its test, so it is actually moved, not added. Seems like it took you a few iterations to get here though, so I guess a mixup happened somewhere.
There was a problem hiding this comment.
HTMLDOcument is a subtype of Document, ie. more specific. In addition to HTML Documents a Document can also be an XMLDocument and I think also an SVGDocument. These kinds of documents also exist on the web.
| [@bs.set] external setCookie : (t_htmlDocument, string) => unit = "cookie"; | ||
| [@bs.get] [@bs.return nullable] external defaultView : t_htmlDocument => option(Dom.window) = ""; | ||
| [@bs.get] external designMode : t_htmlDocument => string /* designMode enum */ = ""; | ||
| [@bs.get] external contentType: T.t => string = ""; |
There was a problem hiding this comment.
This is marked as experimental on MDN and seems to be unavailable on IE11 and Opera Mini. I'm hesitant to include APIs that aren't fully standardized, although this seems pretty established. It should at least have a comment noting that it's experimental here as well. It should also be in Document, not HtmlDocument.
Hey all, minor change, self described( i think)
https://developer.mozilla.org/en-US/docs/Web/API/Document/contentType
https://developer.mozilla.org/en-US/docs/Web/API/Document/dir