mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13: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| {
|
for (0..slen) |i| {
|
||||||
const s = parser.nodeListItem(scripts, @intCast(i)).?;
|
const s = parser.nodeListItem(scripts, @intCast(i)).?;
|
||||||
|
|
||||||
// search only script tag containing text a child.
|
const src = parser.nodeTextContent(s).?;
|
||||||
const text = parser.nodeFirstChild(s) orelse continue;
|
|
||||||
|
|
||||||
const src = parser.nodeTextContent(text).?;
|
|
||||||
try js_env.run(alloc, src, "", &res, &cbk_res);
|
try js_env.run(alloc, src, "", &res, &cbk_res);
|
||||||
|
|
||||||
// return the first failure.
|
// return the first failure.
|
||||||
|
|||||||
Reference in New Issue
Block a user