xml-twig 1.2.82 → 1.2.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/doc/twig.md +5 -7
- package/package.json +1 -1
- package/twig.js +5 -5
package/doc/twig.md
CHANGED
|
@@ -59,7 +59,7 @@ You can specify a <code>function</code> or a <code>event</code> name</p>
|
|
|
59
59
|
<li>Use <code>Twig.Any</code> to call the handler on every element</li>
|
|
60
60
|
</ul>
|
|
61
61
|
</dd>
|
|
62
|
-
<dt><a href="#HandlerFunction">HandlerFunction</a></dt>
|
|
62
|
+
<dt><a href="#HandlerFunction">HandlerFunction</a> : <code>function</code></dt>
|
|
63
63
|
<dd><p>Handler function for Twig objects, i.e. the way you like to use the XML element.</p>
|
|
64
64
|
</dd>
|
|
65
65
|
<dt><a href="#HandlerConditionFilter">HandlerConditionFilter</a> ⇒ <code>boolean</code></dt>
|
|
@@ -1490,8 +1490,8 @@ Reference to handler functions for Twig objects.<br>
|
|
|
1490
1490
|
| Name | Type | Description |
|
|
1491
1491
|
| --- | --- | --- |
|
|
1492
1492
|
| tag | [<code>HandlerCondition</code>](#HandlerCondition) | Element specification |
|
|
1493
|
-
| function | [<code>HandlerFunction</code>](#HandlerFunction) | Definition of handler function, either anonymous or explicit function |
|
|
1494
|
-
| event | <code>string</code> | Type of the event to be emitted |
|
|
1493
|
+
| [function] | [<code>HandlerFunction</code>](#HandlerFunction) | Definition of handler function, either anonymous or explicit function |
|
|
1494
|
+
| [event] | <code>string</code> | Type of the event to be emitted |
|
|
1495
1495
|
|
|
1496
1496
|
<a name="HandlerCondition"></a>
|
|
1497
1497
|
|
|
@@ -1501,13 +1501,12 @@ Condition to specify when handler shall be called<br>
|
|
|
1501
|
-
If `undefined`, then al
|
|
1502
1501
|
**Kind**: global typedef
|
|
1503
1502
|
<a name="HandlerFunction"></a>
|
|
1504
1503
|
|
|
1505
|
-
## HandlerFunction
|
|
1504
|
+
## HandlerFunction : <code>function</code>
|
|
1506
1505
|
Handler function for Twig objects, i.e. the way you like to use the XML element.
|
|
1507
1506
|
|
|
1508
1507
|
**Kind**: global typedef
|
|
1509
|
-
**Properties**
|
|
1510
1508
|
|
|
1511
|
-
|
|
|
1509
|
+
| Param | Type | Description |
|
|
1512
1510
|
| --- | --- | --- |
|
|
1513
1511
|
| elt | [<code>Twig</code>](#Twig) | The current Twig element on which the function was called. |
|
|
1514
1512
|
|
package/package.json
CHANGED
package/twig.js
CHANGED
|
@@ -40,10 +40,10 @@ const Any = new AnyHandler();
|
|
|
40
40
|
* Reference to handler functions for Twig objects.<br>
|
|
41
41
|
* Element can be specified as string, Regular Expression, custom function, `Twig.Root` or `Twig.Any`<br>
|
|
42
42
|
* You can specify a `function` or a `event` name
|
|
43
|
-
* @typedef TwigHandler
|
|
43
|
+
* @typedef TwigHandler
|
|
44
44
|
* @property {HandlerCondition} tag - Element specification
|
|
45
|
-
* @property {
|
|
46
|
-
* @property {
|
|
45
|
+
* @property {HandlerFunction} [function] - Definition of handler function, either anonymous or explicit function
|
|
46
|
+
* @property {string} [event] - Type of the event to be emitted
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
/**
|
|
@@ -59,8 +59,8 @@ const Any = new AnyHandler();
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Handler function for Twig objects, i.e. the way you like to use the XML element.
|
|
62
|
-
* @typedef HandlerFunction
|
|
63
|
-
* @
|
|
62
|
+
* @typedef {function} HandlerFunction
|
|
63
|
+
* @param {Twig} elt - The current Twig element on which the function was called.
|
|
64
64
|
*/
|
|
65
65
|
|
|
66
66
|
/**
|