mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-25 13:50:22 -04:00
Merge pull request #2161 from LLK/e16n
Supporting VM changes for extensionification
This commit is contained in:
commit
9af2e4c086
10 changed files with 209 additions and 57 deletions
src/engine
|
@ -1116,8 +1116,14 @@ class Blocks {
|
|||
let mutationString = `<${mutation.tagName}`;
|
||||
for (const prop in mutation) {
|
||||
if (prop === 'children' || prop === 'tagName') continue;
|
||||
const mutationValue = (typeof mutation[prop] === 'string') ?
|
||||
let mutationValue = (typeof mutation[prop] === 'string') ?
|
||||
xmlEscape(mutation[prop]) : mutation[prop];
|
||||
|
||||
// Handle dynamic extension blocks
|
||||
if (prop === 'blockInfo') {
|
||||
mutationValue = xmlEscape(JSON.stringify(mutation[prop]));
|
||||
}
|
||||
|
||||
mutationString += ` ${prop}="${mutationValue}"`;
|
||||
}
|
||||
mutationString += '>';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue