用户激活 API

Lenix at 
作为 Web 开发人员,您可能已经注意到某些 API 仅在最终用户单击或点击 HTML 元素时才起作用。例如,如果您尝试在 Safari 的 Web Inspector 中运行以下代码,则会导致错误:await navigator.share({ text: "hi" }); NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because …The post 用户激活 API first appeared on Leni……