mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
lit compatibility
Aims to improve compatibility for the lit framework (e.g. what Reddit is using). 1 - Adds support for adoptedStyleSheets to the Document and ShadowRoot 2 - Adds mock support for replace and replaceSync to the CSSStyleSheet 3 - Optionally include shadowroot in dump 4 - Special-case setting innerHTML on a TemplateElement
This commit is contained in:
@@ -799,6 +799,14 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
|
||||
return promise;
|
||||
}
|
||||
|
||||
pub fn newArray(self: *JsContext, len: u32) JsObject {
|
||||
const arr = v8.Array.init(self.isolate, len);
|
||||
return .{
|
||||
.js_context = self,
|
||||
.js_obj = arr.castTo(v8.Object),
|
||||
};
|
||||
}
|
||||
|
||||
// Wrap a v8.Exception
|
||||
fn createException(self: *const JsContext, e: v8.Value) Exception {
|
||||
return .{
|
||||
|
||||
Reference in New Issue
Block a user