webkitURL解析url 报已被弃用,请使用URL;使用URL报错怎么弄??
发布于 4 年前 作者 qzhong 18635 次浏览 来自 问答

let url = `http://rm.test.com/receipt/3207/1012/ORDER0002/10022323`

undefined

let wParams = new webkitURL(url)

VM1338:1 [Deprecation] ‘webkitURL’ is deprecated. Please use ‘URL’ instead.

(anonymous) @ VM1338:1

undefined

let param = new URL(url)

VM1392:1 Uncaught ReferenceError: URL is not defined

    at <anonymous>:1:13

开发者工具截图如下:

回到顶部