Liking cljdoc? Tell your friends :D

hickory.core


Attributecljs

source

Commentcljs

source

Documentcljs

source

DocumentTypecljs

source

Elementcljs

source

extract-doctypecljs

(extract-doctype s)
source

format-doctypecljs

(format-doctype dt)
source

HiccupRepresentableclj/s≠protocol

Objects that can be represented as Hiccup nodes implement this protocol in order to make the conversion.

Objects that can be represented as Hiccup nodes implement this protocol in
order to make the conversion.

as-hiccupclj/s≠

clj
(as-hiccup this)
(as-hiccup this zip-loc)
cljs
(as-hiccup this)

Converts the node given into a hiccup-format data structure. The node must have an implementation of the HiccupRepresentable protocol; nodes created by parse or parse-fragment already do.

Converts the node given into a hiccup-format data structure. The
node must have an implementation of the HiccupRepresentable
protocol; nodes created by parse or parse-fragment already do.
source (clj)source (cljs)raw docstring

HickoryRepresentableclj/s≠protocol

Objects that can be represented as HTML DOM node maps, similar to clojure.xml, implement this protocol to make the conversion.

Each DOM node will be a map or string (for Text/CDATASections). Nodes that are maps have the appropriate subset of the keys

:type - [:comment, :document, :document-type, :element] :tag - node's tag, check :type to see if applicable :attrs - node's attributes as a map, check :type to see if applicable :content - node's child nodes, in a vector, check :type to see if applicable

Objects that can be represented as HTML DOM node maps, similar to
clojure.xml, implement this protocol to make the conversion.

Each DOM node will be a map or string (for Text/CDATASections). Nodes that
are maps have the appropriate subset of the keys

  :type     - [:comment, :document, :document-type, :element]
  :tag      - node's tag, check :type to see if applicable
  :attrs    - node's attributes as a map, check :type to see if applicable
  :content  - node's child nodes, in a vector, check :type to see if
              applicable

as-hickoryclj/s≠

clj
(as-hickory this)
(as-hickory this zip-loc)
cljs
(as-hickory this)

Converts the node given into a hickory-format data structure. The node must have an implementation of the HickoryRepresentable protocol; nodes created by parse or parse-fragment already do.

Converts the node given into a hickory-format data structure. The
node must have an implementation of the HickoryRepresentable protocol;
nodes created by parse or parse-fragment already do.
source (clj)source (cljs)raw docstring

node-typecljs

(node-type type)
source

parseclj/s≠

(parse s)
clj

Parse an entire HTML document into a DOM structure that can be used as input to as-hiccup or as-hickory.

Parse an entire HTML document into a DOM structure that can be
used as input to as-hiccup or as-hickory.
cljs

Parse an entire HTML document into a DOM structure that can be used as input to as-hiccup or as-hickory.

  (-> (parse "<a style=\"visibility:hidden\">foo</a><div style=\"color:green\"><p>Hello</p></div>")
    as-hiccup)
  (-> (parse "<a style=\"visibility:hidden\">foo</a><div style=\"color:green\"><p>Hello</p></div>")
    as-hickory)
Parse an entire HTML document into a DOM structure that can be
   used as input to as-hiccup or as-hickory.

```klipse
  (-> (parse "<a style=\"visibility:hidden\">foo</a><div style=\"color:green\"><p>Hello</p></div>")
    as-hiccup)
```

```klipse
  (-> (parse "<a style=\"visibility:hidden\">foo</a><div style=\"color:green\"><p>Hello</p></div>")
    as-hickory)
```


  
source (clj)source (cljs)raw docstring

parse-dom-with-domparsercljs

(parse-dom-with-domparser s)
source

parse-dom-with-writecljs

(parse-dom-with-write s)

Parse an HTML document (or fragment) as a DOM using document.implementation.createHTMLDocument and document.write.

Parse an HTML document (or fragment) as a DOM using document.implementation.createHTMLDocument and document.write.
sourceraw docstring

parse-fragmentclj/s

(parse-fragment s)

Parse an HTML fragment (some group of tags that might be at home somewhere in the tag hierarchy under <body>) into a list of DOM elements that can each be passed as input to as-hiccup or as-hickory.

Parse an HTML fragment (some group of tags that might be at home somewhere
in the tag hierarchy under <body>) into a list of DOM elements that can
each be passed as input to as-hiccup or as-hickory.
source (clj)source (cljs)raw docstring

remove-elcljs

(remove-el el)
source

Textcljs

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close