时空网前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
360 B

4 years ago
  1. import {inBrowser} from './env'
  2. class Dom {
  3. appendChild() {}
  4. removeChild() {}
  5. querySelector() {}
  6. addEventListener() {}
  7. removeEventListener() {}
  8. }
  9. const dom = new Dom()
  10. let mdDocument = dom
  11. let mdBody = dom
  12. mdDocument.body = mdBody
  13. if (inBrowser) {
  14. // mdDocument = window.document
  15. // mdBody = document.body
  16. }
  17. export {mdDocument, mdBody, dom}