(elem, content)
| 5873 | |
| 5874 | // Prefer a tbody over its parent table for containing new rows |
| 5875 | function manipulationTarget(elem, content) { |
| 5876 | if ( |
| 5877 | nodeName(elem, 'table') && |
| 5878 | nodeName(content.nodeType !== 11 ? content : content.firstChild, 'tr') |
| 5879 | ) { |
| 5880 | return jQuery(elem).children('tbody')[0] || elem; |
| 5881 | } |
| 5882 | |
| 5883 | return elem; |
| 5884 | } |
| 5885 | |
| 5886 | // Replace/restore the type attribute of script elements for safe DOM manipulation |
| 5887 | function disableScript(elem) { |