mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
keep consistent queue for inline
This commit is contained in:
@@ -643,6 +643,18 @@ pub const PendingScript = struct {
|
|||||||
// if async isn't known, it'll fallback to defer.
|
// if async isn't known, it'll fallback to defer.
|
||||||
|
|
||||||
const script = &self.script;
|
const script = &self.script;
|
||||||
|
|
||||||
|
// Module scripts are deferred by default.
|
||||||
|
// https://v8.dev/features/modules#defer
|
||||||
|
if (script.kind == .module) {
|
||||||
|
return &self.manager.deferreds;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Script is not a module but inline, we ignore async/defer properties.
|
||||||
|
if (script.source == .@"inline") {
|
||||||
|
return &self.manager.scripts;
|
||||||
|
}
|
||||||
|
|
||||||
if (script.is_async) {
|
if (script.is_async) {
|
||||||
return &self.manager.asyncs;
|
return &self.manager.asyncs;
|
||||||
}
|
}
|
||||||
@@ -651,12 +663,6 @@ pub const PendingScript = struct {
|
|||||||
return &self.manager.deferreds;
|
return &self.manager.deferreds;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module scripts are deferred by default.
|
|
||||||
// https://v8.dev/features/modules#defer
|
|
||||||
if (script.kind == .module) {
|
|
||||||
return &self.manager.deferreds;
|
|
||||||
}
|
|
||||||
|
|
||||||
return &self.manager.scripts;
|
return &self.manager.scripts;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user