Prepare for webOS & Tizen support

This commit is contained in:
redphx
2024-07-01 17:26:04 +07:00
parent 64d60aedfa
commit c1502b5552
29 changed files with 801 additions and 598 deletions

View File

@@ -24,3 +24,15 @@ export const STATES: BxStates = {
pointerServerPort: 9269,
};
export function deepClone(obj: any): any {
if ('structuredClone' in window) {
return structuredClone(obj);
}
if (!obj) {
return obj;
}
return JSON.parse(JSON.stringify(obj));
}