browser DOM exports

This commit is contained in:
David Bruant 2025-04-17 17:27:53 +02:00
parent df9abcfb56
commit 9b2183827d
2 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<script> <script>
import {tableRawContentToObjects, tableWithoutEmptyRows, getODSTableRawContent, createOdsFile} from './browser.js' import {tableRawContentToObjects, tableWithoutEmptyRows, getODSTableRawContent, createOdsFile} from '../exports.js'
/** @import {SheetName, SheetRawContent} from './types.js' */ /** @import {SheetName, SheetRawContent} from './types.js' */
@ -34,7 +34,7 @@
</script> </script>
<h1>Import fichier .ods et .xslx</h1> <h1>Import fichier .ods</h1>
<section> <section>
<h2>Import</h2> <h2>Import</h2>

View File

@ -5,4 +5,8 @@ console.info('DOM implementation in browser')
export function createDocument(...args){ export function createDocument(...args){
// @ts-ignore // @ts-ignore
return document.implementation.createDocument(...args) return document.implementation.createDocument(...args)
} }
export const DOMParser = window.DOMParser
export const XMLSerializer = window.XMLSerializer
export const Node = window.Node