mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Store parser's current line when script elements are created.
Use the newly stored line as the starting line number when evaluating JS. This ensures that inline scripts will report errors with meaningful line numbers.
This commit is contained in:
parent
d1bc1a4f1b
commit
db2082bc6e
11 changed files with 61 additions and 22 deletions
|
@ -134,8 +134,9 @@ impl TreeSink for Sink {
|
|||
ns: name.namespace_url,
|
||||
local: name.local,
|
||||
};
|
||||
//TODO: Add ability to track lines to API of xml5ever
|
||||
let elem = Element::create(name, prefix, &*self.document,
|
||||
ElementCreator::ParserCreated);
|
||||
ElementCreator::ParserCreated(1));
|
||||
|
||||
for attr in attrs {
|
||||
let name = QualName {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue