import { dom, createElement, textOrComment} from './dom.js' let resolveStep = () => {} let logger = () => {} export function morph(from, toHtml, options) { monkeyPatchDomSetAttributeToAllowAtSymbols() // We're defining these globals and methods inside this function (instead of outside) // because it's an async function and if run twice, they would overwrite // each other. let fromEl let toEl let key ,lookahead ,updating ,updated ,removing ,removed ,adding ,added function assignOptions(options = {}) { let defaultGetKey = el => el.getAttribute('key') let noop = () => {} updating = options.updating || noop updated = options.updated || noop removing = options.removing || noop removed = options.removed || noop adding = options.adding || noop added = options.added || noop key = options.key || defaultGetKey lookahead = options.lookahead || false } function patch(from, to) { // This is a time saver, however, it won't catch differences in nested