Okay/Spec: Difference between revisions

No edit summary
No edit summary
Line 43: Line 43:
A discovery element is a micro-format for informing Okay clients where they should be looking for certain information. They look like this:
A discovery element is a micro-format for informing Okay clients where they should be looking for certain information. They look like this:


```
<pre>
<nav class=“ok-discover”>
<nav class=“ok-discover”>
<a href=“/rooms/” rel=“ok-rooms”>Rooms</a>
<a href=“/rooms/” rel=“ok-rooms”>Rooms</a>
Line 49: Line 49:
<a href=“/prefs/” rel=“ok-prefs”>Preferences</a>
<a href=“/prefs/” rel=“ok-prefs”>Preferences</a>
</nav>
</nav>
```
</pre>


The discovery element is defined as any element with the “ok-discover” class. Any non-void element can be the discovery element, but it really should be a “nav” if you can help it. The discovery element must contain one or more anchor (a) elements with valid rel and href attributes. Any invalid anchors should be ignored by the client. The inner text of the anchor elements is not significant and must be ignored by clients.
The discovery element is defined as any element with the “ok-discover” class. Any non-void element can be the discovery element, but it really should be a “nav” if you can help it. The discovery element must contain one or more anchor (a) elements with valid rel and href attributes. Any invalid anchors should be ignored by the client. The inner text of the anchor elements is not significant and must be ignored by clients.