domManagement.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * Checks if the window object exists
  3. * @returns true if the window object exists
  4. */
  5. export declare function IsWindowObjectExist(): boolean;
  6. /**
  7. * Checks if the navigator object exists
  8. * @returns true if the navigator object exists
  9. */
  10. export declare function IsNavigatorAvailable(): boolean;
  11. /**
  12. * Check if the document object exists
  13. * @returns true if the document object exists
  14. */
  15. export declare function IsDocumentAvailable(): boolean;
  16. /**
  17. * Extracts text content from a DOM element hierarchy
  18. * @param element defines the root element
  19. * @returns a string
  20. */
  21. export declare function GetDOMTextContent(element: HTMLElement): string;
  22. /**
  23. * Sets of helpers dealing with the DOM and some of the recurrent functions needed in
  24. * Babylon.js
  25. */
  26. export declare const DomManagement: {
  27. /**
  28. * Checks if the window object exists
  29. * @returns true if the window object exists
  30. */
  31. IsWindowObjectExist: typeof IsWindowObjectExist;
  32. /**
  33. * Checks if the navigator object exists
  34. * @returns true if the navigator object exists
  35. */
  36. IsNavigatorAvailable: typeof IsNavigatorAvailable;
  37. /**
  38. * Check if the document object exists
  39. * @returns true if the document object exists
  40. */
  41. IsDocumentAvailable: typeof IsDocumentAvailable;
  42. /**
  43. * Extracts text content from a DOM element hierarchy
  44. * @param element defines the root element
  45. * @returns a string
  46. */
  47. GetDOMTextContent: typeof GetDOMTextContent;
  48. };