
## 2018-05-04 #todoist

### Exploring an model / API through navigating vs. poking

Being able to navigate a model through standard tools vs. having to figure out everything belongs together and how to get from one point to another.

- new polymorphic identifier -> fetch protocols
  - [TODOist](browse://src/client/protocols/todoist.js), <todoist://>
  - [Plex](browse://demos/plex/plex-scheme.js), <plex://>
- [poid examples](browse://src/client/poid.js)
  - LivelyBrowse, <browse://src/client/html.js>
  - LivelyOpen, <open://lively-ball>
  - LivelySearch, <search://#TODO>, (in the moment, just for #Hashtags)
  - LivelyFile, <livelyfile:///foo.txt>
  - InnerHTMLElementQuery <innerhtml://#foo>
  - InnerHTMLElementQuery <query://#foo>
  
  
### Snippet to extract links

```javascript
_.uniq(Array.from(this.querySelectorAll("tr"))
  .map(ea => ea.querySelector("a"))
  .filter(ea => ea)
  .map( ea => ea && ea.getAttribute("href"))).join("\n")
```

```javascript
_.uniq(Array.from(this.querySelectorAll("a"))
  .filter(ea => ea)
  .map( ea => ea && ea.getAttribute("href"))).join("\n")
```

```javascript
import { uniq, last } from 'utils';
```

```javascript
that.querySelectorAll("a")::map()
  .map( ea => ea.getAttribute("href")).join("\n")
```

### Doku

```html
<div> bla </div>
<my-component></my-component>
```

Etwas indirekter ist es components dynamisch zu erstelllen...

```html
<script>
(async () => {
  var comp = await (<my-component prop={2*3}>{"das" + "geht auch"}</my-component>)
  comp.addEvent...
  return comp
})()
</script>
```


