diff --git a/package.json b/package.json index 82e5aeb..2564b62 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "dev": "parcel watch src/manifest.json --host localhost --target pinmenote-dev --no-cache", "dev:ff": "parcel build src/manifest.json --target pinmenote-firefox-dev --no-cache --detailed-report 0", + "build": "npm run prod && npm run prod:ff", "prod": "parcel build src/manifest.json --target pinmenote-prod --no-cache --detailed-report 0", "prod:ff": "parcel build src/manifest.json --target pinmenote-firefox-prod --no-cache --detailed-report 0", "lint": "eslint --ext .ts,.tsx src/", diff --git a/src/content-script/factory/html.factory.ts b/src/content-script/factory/html.factory.ts index e27a611..f910a20 100644 --- a/src/content-script/factory/html.factory.ts +++ b/src/content-script/factory/html.factory.ts @@ -167,6 +167,18 @@ export class HtmlFactory { fnConsoleLog('PROBLEM fnComputeHtmlContent !!!', node.nodeType); } } + + // Fix object element children + if (ref instanceof HTMLObjectElement && ref.contentDocument) { + const children = Array.from(ref.contentDocument.childNodes); + for (const node of children) { + if (node.nodeType === Node.ELEMENT_NODE) { + const computed = await this.computeHtmlIntermediateData(node as Element); + html += computed.html; + } + } + } + html += ``; return {