Nokogiri
The Nokogiri filter allows the web DOM API to behave much like the API of the Nokogiri gem.
List of Transformations
add_childappendChildadd_next_siblingnode.parentNode.insertBefore(sibling, node.nextSibling)add_previous_siblingnode.parentNode.insertBefore(sibling, node)afternode.parentNode.insertBefore(sibling, node.nextSibling)atquerySelectorattrgetAttributeattributegetAttributeNodebeforenode.parentNode.insertBefore(sibling, node)cdata?node.nodeType === Node.CDATA_SECTION_NODEchildrenchildNodescomment?node.nodeType === Node.COMMENT_NODEcontenttextContentcreate_elementcreateElementdocumentownerDocumentelement?node.nodeType === Node.ELEMENT_NODEfragment?node.nodeType === Node.FRAGMENT_NODEget_attributegetAttributehas_attributehasAttributeinner_htmlinnerHTMLkey?hasAttributenamenextSiblingnextnodeNamenext=node.parentNode.insertBefore(sibling,node.nextSibling)next_elementnextElementnext_siblingnextSiblingNokogiri::HTML5new JSDOM().window.documentNokogiri::HTML5.parsenew JSDOM().window.documentNokogiri::HTMLnew JSDOM().window.documentNokogiri::HTML.parsenew JSDOM().window.documentNokogiri::XML::Node.newdocument.createElement()parentparentNodeprevious=node.parentNode.insertBefore(sibling, node)previous_elementpreviousElementprevious_siblingpreviousSiblingprocessing_instruction?node.nodeType === Node.PROCESSING_INSTRUCTION_NODEremove_attributeremoveAttributerootdocumentElementsearchquerySelectorAllset_attributesetAttributetext?node.nodeType === Node.TEXT_NODEtexttextContentto_htmlouterHTML