add model for sax

This commit is contained in:
Erik Krogh Kristensen
2021-02-04 17:50:49 +01:00
parent c43025d7b3
commit 73f7cd149f
3 changed files with 43 additions and 0 deletions

View File

@@ -147,3 +147,4 @@ typeInferenceMismatch
| tst.js:2:13:2:20 | source() | tst.js:48:10:48:22 | new Buffer(x) |
| xml.js:5:18:5:25 | source() | xml.js:8:14:8:17 | text |
| xml.js:12:17:12:24 | source() | xml.js:13:14:13:19 | result |
| xml.js:23:18:23:25 | source() | xml.js:20:14:20:17 | attr |

View File

@@ -12,4 +12,14 @@
parseString(source(), function (err, result) {
sink(result); // NOT OK
});
var sax = require("sax");
var parser = sax.parser(strict);
parser.onattribute = function (attr) {
sink(attr); // NOT OK
};
parser.write(source()).close();
})();