This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 73
minor additions to document #172
Open
BlueHotDog
wants to merge
8
commits into
reasonml-community:master
Choose a base branch
from
BlueHotDog:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f33d56e
adding content-type
BlueHotDog ad4fcdd
adding dir
BlueHotDog e00a897
moving dir out of htmldocument to document
BlueHotDog 6306a5b
adding title
BlueHotDog 4c8d8d2
moving ready state
BlueHotDog e4de091
oops
BlueHotDog 39f057f
moving thing around
BlueHotDog 246048d
fixing tests
BlueHotDog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,13 @@ module Impl = (T: {type t;}) => { | |
|
||
[@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 = ""; | ||
[@bs.set] external setBody : (t_htmlDocument, Dom.element) => unit = "body"; /* accepth HTMLBodyElement */ | ||
[@bs.get] external cookie : t_htmlDocument => string = ""; | ||
[@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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 |
||
let designMode: t_htmlDocument => Webapi__Dom__Types.designMode = | ||
(self) => Webapi__Dom__Types.decodeDesignMode(designMode(self)); | ||
[@bs.set] external setDesignMode : (t_htmlDocument, string /* designMode enum */) => unit = "designMode"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this been moved here from
Document
? The documentation you refer to lists it as a property ofDocument
, andas HtmlDocument
inherits everything fromDocument
it should be available here anyway.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTMLDOcument
is a subtype ofDocument
, ie. more specific. In addition to HTML Documents aDocument
can also be anXMLDocument
and I think also anSVGDocument
. These kinds of documents also exist on the web.