Setting caption?

master
Thomas Hintz 4 years ago
parent 2a0609052f
commit d33124c6d2

@ -179,7 +179,7 @@ children.
| props | 'class', 'type', 'disabled' | | props | 'class', 'type', 'disabled' |
| children | <h1>, <input>, Hello | | children | <h1>, <input>, Hello |
#+BEGIN_SRC #+BEGIN_SRC :number-lines nil
tag name: 'div' tag name: 'div'
tag prop: 'class' tag prop: 'class'
children: h1..., 'Hello', input... children: h1..., 'Hello', input...
@ -574,7 +574,7 @@ and then loop through the current props, setting them accordingly. Of
course we filter out the ~children~ prop since we use that elsewhere course we filter out the ~children~ prop since we use that elsewhere
and it isn't intended to be set directly. and it isn't intended to be set directly.
#+NAME: Setting DOM Props #+CAPTION: Setting DOM Props
#+BEGIN_SRC javascript #+BEGIN_SRC javascript
function setDOMProps(element, domElement, prevElement) { function setDOMProps(element, domElement, prevElement) {
if (prevElement) { if (prevElement) {

@ -44,6 +44,7 @@ I see three parts: the name of the tag, the tag's properties, and its children.
| props | 'class', 'type', 'disabled' | | props | 'class', 'type', 'disabled' |
| children | <h1>, <input>, Hello | | children | <h1>, <input>, Hello |
{format: ":number-lines"}
``` ```
tag name: 'div' tag name: 'div'
tag prop: 'class' tag prop: 'class'
@ -311,7 +312,7 @@ function createDOMElement(element) {
To set the props on an element we first clear all the existing props and then loop through the current props, setting them accordingly. Of course we filter out the `children` prop since we use that elsewhere and it isn't intended to be set directly. To set the props on an element we first clear all the existing props and then loop through the current props, setting them accordingly. Of course we filter out the `children` prop since we use that elsewhere and it isn't intended to be set directly.
{format: "javascript", id: "Setting DOM Props"} {format: "javascript", caption: "Setting DOM Props"}
``` ```
function setDOMProps(element, domElement, prevElement) { function setDOMProps(element, domElement, prevElement) {
if (prevElement) { if (prevElement) {

Loading…
Cancel
Save