All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.prod.DOMObserver.js.map Maven / Gradle / Ivy

{
  "version": 3,
  "sources": ["../../src/DOMObserver.ts"],
  "sourcesContent": ["const observers = new WeakMap();\n\n/**\n * @param node\n * @param callback\n * @param options\n */\nconst observeDOMNode = (node: Node, callback: MutationCallback, options?: MutationObserverInit) => {\n\tconst observer = new MutationObserver(callback);\n\tobservers.set(node, observer);\n\tobserver.observe(node, options);\n};\n\n/**\n * @param node\n */\nconst unobserveDOMNode = (node: Node) => {\n\tconst observer = observers.get(node);\n\tif (observer) {\n\t\tobserver.disconnect();\n\t\tobservers.delete(node);\n\t}\n};\n\nexport {\n\tobserveDOMNode,\n\tunobserveDOMNode,\n};\n"],
  "mappings": "aAAA,MAAMA,EAAY,IAAI,QAOhBC,EAAiB,CAACC,EAAYC,EAA4BC,IAAmC,CAClG,MAAMC,EAAW,IAAI,iBAAiBF,CAAQ,EAC9CH,EAAU,IAAIE,EAAMG,CAAQ,EAC5BA,EAAS,QAAQH,EAAME,CAAO,CAC/B,EAKME,EAAoBJ,GAAe,CACxC,MAAMG,EAAWL,EAAU,IAAIE,CAAI,EAC/BG,IACHA,EAAS,WAAW,EACpBL,EAAU,OAAOE,CAAI,EAEvB,EAEA,OACCD,KAAA,eACAK,KAAA",
  "names": ["observers", "observeDOMNode", "node", "callback", "options", "observer", "unobserveDOMNode"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy