mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
wpt: get the script content fonr the node itself
instead of using the first child only which result a partial content. see https://github.com/Browsercore/browsercore/issues/59
This commit is contained in:
@@ -225,10 +225,7 @@ fn runWPT(arena: *std.heap.ArenaAllocator, f: []const u8, loader: *FileLoader) !
|
||||
for (0..slen) |i| {
|
||||
const s = parser.nodeListItem(scripts, @intCast(i)).?;
|
||||
|
||||
// search only script tag containing text a child.
|
||||
const text = parser.nodeFirstChild(s) orelse continue;
|
||||
|
||||
const src = parser.nodeTextContent(text).?;
|
||||
const src = parser.nodeTextContent(s).?;
|
||||
try js_env.run(alloc, src, "", &res, &cbk_res);
|
||||
|
||||
// return the first failure.
|
||||
|
||||
Reference in New Issue
Block a user