1 |
- {"ast":null,"code":"/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Checks if the window object exists\n * @returns true if the window object exists\n */\nexport function IsWindowObjectExist() {\n return typeof window !== \"undefined\";\n}\n/**\n * Checks if the navigator object exists\n * @returns true if the navigator object exists\n */\nexport function IsNavigatorAvailable() {\n return typeof navigator !== \"undefined\";\n}\n/**\n * Check if the document object exists\n * @returns true if the document object exists\n */\nexport function IsDocumentAvailable() {\n return typeof document !== \"undefined\";\n}\n/**\n * Extracts text content from a DOM element hierarchy\n * @param element defines the root element\n * @returns a string\n */\nexport function GetDOMTextContent(element) {\n let result = \"\";\n let child = element.firstChild;\n while (child) {\n if (child.nodeType === 3) {\n result += child.textContent;\n }\n child = child.nextSibling;\n }\n return result;\n}\n/**\n * Sets of helpers dealing with the DOM and some of the recurrent functions needed in\n * Babylon.js\n */\nexport const DomManagement = {\n /**\n * Checks if the window object exists\n * @returns true if the window object exists\n */\n IsWindowObjectExist,\n /**\n * Checks if the navigator object exists\n * @returns true if the navigator object exists\n */\n IsNavigatorAvailable,\n /**\n * Check if the document object exists\n * @returns true if the document object exists\n */\n IsDocumentAvailable,\n /**\n * Extracts text content from a DOM element hierarchy\n * @param element defines the root element\n * @returns a string\n */\n GetDOMTextContent\n};","map":{"version":3,"names":["IsWindowObjectExist","window","IsNavigatorAvailable","navigator","IsDocumentAvailable","document","GetDOMTextContent","element","result","child","firstChild","nodeType","textContent","nextSibling","DomManagement"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Misc/domManagement.js"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Checks if the window object exists\n * @returns true if the window object exists\n */\nexport function IsWindowObjectExist() {\n return typeof window !== \"undefined\";\n}\n/**\n * Checks if the navigator object exists\n * @returns true if the navigator object exists\n */\nexport function IsNavigatorAvailable() {\n return typeof navigator !== \"undefined\";\n}\n/**\n * Check if the document object exists\n * @returns true if the document object exists\n */\nexport function IsDocumentAvailable() {\n return typeof document !== \"undefined\";\n}\n/**\n * Extracts text content from a DOM element hierarchy\n * @param element defines the root element\n * @returns a string\n */\nexport function GetDOMTextContent(element) {\n let result = \"\";\n let child = element.firstChild;\n while (child) {\n if (child.nodeType === 3) {\n result += child.textContent;\n }\n child = child.nextSibling;\n }\n return result;\n}\n/**\n * Sets of helpers dealing with the DOM and some of the recurrent functions needed in\n * Babylon.js\n */\nexport const DomManagement = {\n /**\n * Checks if the window object exists\n * @returns true if the window object exists\n */\n IsWindowObjectExist,\n /**\n * Checks if the navigator object exists\n * @returns true if the navigator object exists\n */\n IsNavigatorAvailable,\n /**\n * Check if the document object exists\n * @returns true if the document object exists\n */\n IsDocumentAvailable,\n /**\n * Extracts text content from a DOM element hierarchy\n * @param element defines the root element\n * @returns a string\n */\n GetDOMTextContent,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,mBAAmBA,CAAA,EAAG;EAClC,OAAO,OAAOC,MAAM,KAAK,WAAW;AACxC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAAA,EAAG;EACnC,OAAO,OAAOC,SAAS,KAAK,WAAW;AAC3C;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAA,EAAG;EAClC,OAAO,OAAOC,QAAQ,KAAK,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACC,OAAO,EAAE;EACvC,IAAIC,MAAM,GAAG,EAAE;EACf,IAAIC,KAAK,GAAGF,OAAO,CAACG,UAAU;EAC9B,OAAOD,KAAK,EAAE;IACV,IAAIA,KAAK,CAACE,QAAQ,KAAK,CAAC,EAAE;MACtBH,MAAM,IAAIC,KAAK,CAACG,WAAW;IAC/B;IACAH,KAAK,GAAGA,KAAK,CAACI,WAAW;EAC7B;EACA,OAAOL,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMM,aAAa,GAAG;EACzB;AACJ;AACA;AACA;EACId,mBAAmB;EACnB;AACJ;AACA;AACA;EACIE,oBAAoB;EACpB;AACJ;AACA;AACA;EACIE,mBAAmB;EACnB;AACJ;AACA;AACA;AACA;EACIE;AACJ,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|