How to get accessKeyLabel in WebKit with JavaScrip

2019-05-17 09:56发布

This question already has an answer here:

accessKeyLabel from what I can tell is not supported in Webkit (but works fine in Firefox) at the time of writing. This snippet shows what happens:

<input type="text" accesskey="D" name="dog" id="dog">

var dogInput = document.getElementById('dog');

console.log(dogInput.accessKey);
// Firefox, Webkit both output: "D"

console.log(dogInput.accessKeyLabel);
// Firefox output: "[ACCESS MODIFIER] D"
// Webkit output: undefined

Is there another way of getting the access modifier combination or accessKeyLabel in Webkit?

1条回答
Lonely孤独者°
2楼-- · 2019-05-17 10:21

This is an unimplemented feature (known bug) in WebKit:
https://bugs.webkit.org/show_bug.cgi?id=72715

查看更多
登录 后发表回答