Remove get-builtin-element
This commit is contained in:
parent
9b4e206623
commit
fb7a549e83
2 changed files with 4 additions and 14 deletions
10
README.md
10
README.md
|
@ -46,18 +46,14 @@ It's
|
|||
```
|
||||
|
||||
- Improved:
|
||||
- Element functions are wrapped in macros for natural indentation. To manipulate them as function objects, prefix '%' to the element name, or use `get-builtin-element` function.
|
||||
- Element functions are wrapped in macros for natural indentation. To manipulate them directly, prefix '%' to the element name.
|
||||
- Bugfix. https://github.com/ailisp/flute/issues/5, https://github.com/ailisp/flute/issues/7
|
||||
|
||||
```lisp
|
||||
(define-element dynamic-1 (as)
|
||||
(define-element tag (as)
|
||||
(funcall as props children))
|
||||
|
||||
(define-element dynamic-2 (as)
|
||||
(funcall (get-builtin-element as) props children))
|
||||
|
||||
(dynamic-1 :as #'%span :class "bold" "child")
|
||||
(dynamic-2 :as 'span :class "bold" "child")
|
||||
(tag :as #'%span :class "bold" "child")
|
||||
|
||||
; <span class="bold">child</span>
|
||||
```
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
#:element-prefix
|
||||
#:element-children
|
||||
#:user-element-expand-to
|
||||
#:h
|
||||
#:get-builtin-element))
|
||||
#:h))
|
||||
(in-package #:piccolo/elements)
|
||||
|
||||
;;; classes
|
||||
|
@ -279,8 +278,3 @@
|
|||
(or (html-element-p node) (fragment-p node)))
|
||||
(lambda (node)
|
||||
(find-symbol (string node) :piccolo)))))
|
||||
|
||||
;;; Utility
|
||||
|
||||
(defun get-builtin-element (name)
|
||||
(find-symbol (string (symbolicate '% name)) :piccolo))
|
||||
|
|
Loading…
Reference in a new issue