You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our use for JSDOM is to provide a substitute for browser’s Document interface at build time. Perhaps the two main uses for it are:
Store adapters: parsing XML sources (they get passed the decodeXML() function, which returns a Document). Occasionally MN XML adapter uses querySelector(), for example.
Content adapters: generating DOM elements in ProseMirror schema. This is not always needed, but it is technically allowed for schema nodes toDOM() implementations to return actual DOM elements (document.createElement(…)) instead of a spec, and sometimes it comes in useful.
JSDOM provides extensive coverage of selectors and such, but it’s unclear whether all of it is needed and is worth the cost of including this massive library.
The steps would be to try to supplant uses of new JSDOM() with corresponding xmldom or other DOM parser/manipulator implementations, and see if it works for MN.
The text was updated successfully, but these errors were encountered:
Our use for JSDOM is to provide a substitute for browser’s Document interface at build time. Perhaps the two main uses for it are:
decodeXML()
function, which returns a Document). Occasionally MN XML adapter usesquerySelector()
, for example.toDOM()
implementations to return actual DOM elements (document.createElement(…)
) instead of a spec, and sometimes it comes in useful.JSDOM provides extensive coverage of selectors and such, but it’s unclear whether all of it is needed and is worth the cost of including this massive library.
The steps would be to try to supplant uses of
new JSDOM()
with corresponding xmldom or other DOM parser/manipulator implementations, and see if it works for MN.The text was updated successfully, but these errors were encountered: