进行了一些小修复

This commit is contained in:
2026-08-26 17:24:37 +08:00
parent 5121b33ad5
commit bfc16de962
6 changed files with 13 additions and 68 deletions
@@ -64,3 +64,16 @@ test('legacy runtime modules use jQuery explicitly without a dollar alias', () =
}
}
});
test('theme runtime never changes native listener passivity for third-party editors', () => {
const scripts = read('src/Core/Scripts.php');
const scriptsPart2 = read('src/Core/ScriptsPart2.php');
const buildTool = read('tools/build-public-assets.mjs');
const publicRuntime = read('assets/js/build/public.js');
assert.doesNotMatch(scripts, /enqueue_passive_polyfill|aksrt-passive-events/);
assert.doesNotMatch(scriptsPart2, /enqueue_passive_polyfill|aksrt-passive-events/);
assert.doesNotMatch(buildTool, /passive-events\.js/);
assert.doesNotMatch(publicRuntime, /EventTarget\.prototype\.addEventListener|__passiveSupported/);
assert.equal(fs.existsSync(path.join(root, 'assets/js/passive-events.js')), false);
});