mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-02 19:42:51 +08:00
fix(skin): match macOS recovery shortcut by physical key code and forbid toolbar hook attribute
This commit is contained in:
1 parent
881354e283
commit
cfbf488f75
7 files changed
+63
-6
No files matched your search
@@ -108,12 +108,15 @@ test("host-owned layer attributes are not skin hooks", () => {
|
||||
for (const attribute of [
|
||||
"data-ws-host-layer",
|
||||
"data-ws-host-recovery",
|
||||
"data-ws-host-recovery-toolbar",
|
||||
"data-ws-host-layer-content",
|
||||
"data-ws-recovery-action",
|
||||
]) {
|
||||
// A public hook in the same selector gets past the "must use a public hook"
|
||||
// check, so the attribute-name rejection is what stops the selector.
|
||||
assert.throws(() => compile(`:root [${attribute}] { display: none; }`), /host attribute/, attribute);
|
||||
// A :root-prefixed mixed selector with a public part hook must also fail.
|
||||
assert.throws(() => compile(`:root [data-ws-part="home.header"] [${attribute}] { color: red; }`), /host attribute/, attribute);
|
||||
assert.throws(() => compile(`[data-ws-part="home.header"] [${attribute}] { color: red; }`), /host attribute/, attribute);
|
||||
assert.throws(() => compile(`[data-ws-part="home.header"] [${attribute}="x"] { color: red; }`), /host attribute/, attribute);
|
||||
}
|
||||
|
||||
@@ -104,6 +104,7 @@ const FORBIDDEN_SCOPE_ATTRIBUTES = new Set([
|
||||
// opting into the element by attribute.
|
||||
"data-ws-host-layer",
|
||||
"data-ws-host-recovery",
|
||||
"data-ws-host-recovery-toolbar",
|
||||
"data-ws-host-layer-content",
|
||||
"data-ws-recovery-action",
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user