UNPKG

@doodad-js/xml

Version:
2 lines 1.24 kB
// Copyright 2015-2018 Claude Petit, licensed under Apache License version 2.0 "use strict";exports.add=function add(modules){modules=(modules||{});modules['Doodad.Tools.Xml.Parsers.Libxml2.Loader']={version:'5.2.0b',dependencies:['Doodad.Tools.Xml',],create:function create(root,_options){const doodad=root.Doodad,tools=doodad.Tools,modules=doodad.Modules,xml=tools.Xml,xmlParsers=xml.Parsers,libxml2=xmlParsers.Libxml2,libxml2Loader=libxml2.Loader;const __Internal__={libxml2:null,};libxml2Loader.ADD('get',root.DD_DOC(null,function get(){return __Internal__.libxml2}));return function init(options){const unhandledListeners=process.listeners('unhandledRejection');const handledListeners=process.listeners('rejectionHandled');return modules.import('@doodad-js/xml/lib/libxml2/libxml2.js').then(function(exports){process.listeners('unhandledRejection').forEach(function(listener){if(tools.indexOf(unhandledListeners,listener)<0){process.removeListener('unhandledRejection',listener)}});process.listeners('rejectionHandled').forEach(function(listener){if(tools.indexOf(handledListeners,listener)<0){process.removeListener('rejectionHandled',listener)}});__Internal__.libxml2=exports.default}).catch(function(err){})}},};return modules};