如何以及在何处使用navigator.registerProtocolHandler使其工作?.Thistopic建议您可以调用以下函数来添加自定义协议(protocol)处理程序:navigator.registerProtocolHandler('web+custom','http://example.com/rph?q=%s','MyApp');当我从控制台调用它时,我得到了UncaughtDOMException:Failedtoexecute'registerProtocolHandler'on'Navigator':Canonlyregistercustomhandleri