sax 1.1.6 → 1.2.1
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/README.md +5 -0
- package/lib/sax.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -168,6 +168,11 @@ would trigger this kind of event. This is a weird thing to support, so it
|
|
|
168
168
|
might go away at some point. SAX isn't intended to be used to parse SGML,
|
|
169
169
|
after all.
|
|
170
170
|
|
|
171
|
+
`opentagstart` - Emitted immediately when the tag name is available,
|
|
172
|
+
but before any attributes are encountered. Argument: object with a
|
|
173
|
+
`name` field and an empty `attributes` set. Note that this is the
|
|
174
|
+
same object that will later be emitted in the `opentag` event.
|
|
175
|
+
|
|
171
176
|
`opentag` - An opening tag. Argument: object with `name` and `attributes`.
|
|
172
177
|
In non-strict mode, tag names are uppercased, unless the `lowercase`
|
|
173
178
|
option is set. If the `xmlns` option is set, then it will contain
|
package/lib/sax.js
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
'sgmldeclaration',
|
|
28
28
|
'doctype',
|
|
29
29
|
'comment',
|
|
30
|
+
'opentagstart',
|
|
30
31
|
'attribute',
|
|
31
32
|
'opentag',
|
|
32
33
|
'closetag',
|
|
@@ -703,6 +704,7 @@
|
|
|
703
704
|
tag.ns = parent.ns
|
|
704
705
|
}
|
|
705
706
|
parser.attribList.length = 0
|
|
707
|
+
emitNode(parser, 'onopentagstart', tag)
|
|
706
708
|
}
|
|
707
709
|
|
|
708
710
|
function qname (name, attribute) {
|
package/package.json
CHANGED