Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293417

Tags td, tr or th ignored by new parseHTML implementation

$
0
0

Problem/Motivation

I have used such command
$ajax_response->addCommand(new ReplaceCommand($selector, '<td>Hello!</td>'));

but in result i see only - "Hello!", without tags

Steps to reproduce

Replace one cell not working.

// Not working.
$ajax_response->addCommand(new ReplaceCommand($selector, '<td>Hello!</td>')); 

Replace one table working.

// Working.
$ajax_response->addCommand(new ReplaceCommand($selector, '<table><tr><td>Hello!</td></tr></table>'));

Proposed resolution

from https://stackoverflow.com/a/43112816

var template = document.createElement( 'template' )
template.innerHTML = '<td></td>'
var frag = template.content
console.log( frag.childNodes )   // output => [td]

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 293417

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>