Skip to content

Commit

Permalink
Merge pull request #319 from LogicalOverflow/master
Browse files Browse the repository at this point in the history
Add additional variants to linktype for the rel attribute
  • Loading branch information
Drup authored Sep 27, 2023
2 parents 407f41b + 3d453a1 commit becaf65
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# NEXT
* Add additional variants to `linktype` for the `rel` attribute (Leon
@LogicalOverflow Vack)

* Expand options for `autocomplete` attribute on `<input>` elements
(#302 by Aron @aronerben Erben)

Expand Down
10 changes: 9 additions & 1 deletion lib/html_f.ml
Original file line number Diff line number Diff line change
Expand Up @@ -886,19 +886,27 @@ struct
| `Author -> "author"
| `Bookmark -> "bookmark"
| `Canonical -> "canonical"
| `Dns_prefetch -> "dns-prefetch"
| `External -> "external"
| `First -> "first"
| `Help -> "help"
| `Icon -> "icon"
| `Index -> "index"
| `Last -> "last"
| `License -> "license"
| `Manifest -> "manifest"
| `Me -> "me"
| `Modulepreload -> "modulepreload"
| `Next -> "next"
| `Nofollow -> "nofollow"
| `Noreferrer -> "noreferrer"
| `Noopener -> "noopener"
| `Noreferrer -> "noreferrer"
| `Opener -> "opener"
| `Pingback -> "pingback"
| `Preconnect -> "preconnect"
| `Prefetch -> "prefetch"
| `Preload -> "preload"
| `Prerender -> "prerender"
| `Prev -> "prev"
| `Search -> "search"
| `Stylesheet -> "stylesheet"
Expand Down
30 changes: 27 additions & 3 deletions lib/html_types.mli
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,28 @@ type linktype =
| `Author
| `Bookmark
| `Canonical
| `Dns_prefetch
| `External
| `First
| `Help
| `Icon
| `Index
| `Last
| `License
| `Manifest
| `Me
| `Modulepreload
| `Next
| `Nofollow
| `Noreferrer
| `Noopener
| `Noreferrer
| `Opener
| `Pingback
| `Preconnect
| `Prefetch
| `Prev
| `Preload
| `Prerender
| `Search
| `Stylesheet
| `Sidebar
Expand Down Expand Up @@ -151,6 +159,8 @@ type linktypes = linktype list
Gives the permalink for the nearest ancestor section.}
{- [`Canonical]:
Gives the preferred location for accessing the current document.}
{- [`Dns_prefetch]:
Specifies that the user agent should preemptively perform DNS resolution for the target resource's origin..}
{- [`External]:
Indicates that the referenced document is not part of the same site as the current document.}
{- [`First]:
Expand All @@ -165,18 +175,32 @@ type linktypes = linktype list
Indicates that the current document is a part of a series, and that the last document in the series is the referenced document.}
{- [`Licence]:
Indicates that the main content of the current document is covered by the copyright license described by the referenced document.}
{- [`Manifest]:
Imports or links to an application manifest.}
{- [`Me]:
Indicates that the current document represents the person who owns the linked content.}
{- [`Modulepreload]:
Specifies that the user agent must preemptively fetch the module script and store it in the document's module map for later evaluation. Optionally, the module's dependencies can be fetched as well.}
{- [`Next]:
Indicates that the current document is a part of a series, and that the next document in the series is the referenced document.}
{- [`Nofollow]:
Indicates that the current document's original author or publisher does not endorse the referenced document.}
{- [`Noreferrer]:
Requires that the user agent not send an HTTP Referer (sic) header if the user follows the hyperlink.}
{- [`Noopener]:
Instructs the browser to open the link without granting the new browsing context access to the document that opened it.}
{- [`Noreferrer]:
Requires that the user agent not send an HTTP Referer (sic) header if the user follows the hyperlink.}
{- [`Opener]:
Creates an auxiliary browsing context if the hyperlink would otherwise create a top-level traversable with a non-auxiliary browsing context (i.e., has "_blank" as target attribute value).}
{- [`Pingback]:
Gives the address of the pingback server that handles pingbacks to the current document.}
{- [`Preconnect]:
Specifies that the user agent should preemptively connect to the target resource's origin.}
{- [`Prefetch]:
Specifies that the target resource should be preemptively cached.}
{- [`Preload]:
Specifies that the user agent must preemptively fetch and cache the target resource for current navigation according to the potential destination given by the as attribute (and the priority associated with the corresponding destination).}
{- [`Prerender]:
Specifies that the user agent should preemptively fetch the target resource and process it in a way that helps deliver a faster response in the future.}
{- [`Prev]:
Indicates that the current document is a part of a series, and that the previous document in the series is the referenced document.}
{- [`Search]:
Expand Down

0 comments on commit becaf65

Please sign in to comment.