Improve get-builtin-element
This commit is contained in:
parent
fc264bfb2c
commit
a2b6b1d99a
2 changed files with 6 additions and 6 deletions
|
@ -46,7 +46,7 @@ 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-element` function.
|
||||
- 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.
|
||||
- Bugfix. https://github.com/ailisp/flute/issues/5, https://github.com/ailisp/flute/issues/7
|
||||
|
||||
```lisp
|
||||
|
@ -54,10 +54,10 @@ It's
|
|||
(funcall as props children))
|
||||
|
||||
(define-element dynamic-2 (as)
|
||||
(funcall (get-element as) props children))
|
||||
(funcall (get-builtin-element as) props children))
|
||||
|
||||
(dynamic-1 :as #'%span :class "bold" "child")
|
||||
(dynamic-2 :as "span" :class "bold" "child")
|
||||
(dynamic-2 :as 'span :class "bold" "child")
|
||||
|
||||
; <span class="bold">child</span>
|
||||
```
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#:element-children
|
||||
#:user-element-expand-to
|
||||
#:h
|
||||
#:get-element))
|
||||
#:get-builtin-element))
|
||||
(in-package #:piccolo/elements)
|
||||
|
||||
;;; classes
|
||||
|
@ -283,5 +283,5 @@
|
|||
|
||||
;;; Utility
|
||||
|
||||
(defun get-element (name)
|
||||
(find-symbol (concatenate 'string "%" (string-upcase name)) :piccolo))
|
||||
(defun get-builtin-element (name)
|
||||
(find-symbol (string (symbolicate '% name)) :piccolo))
|
||||
|
|
Loading…
Reference in a new issue