我想在我的程序中获取 chrome 日志,因为即使我附加onerror了 video标签但无法触发大的 ts 间隙错误,只有当我打开media-internals标签并且可以像这样看到它时:
我想通过我的js代码收集这些错误信息,请帮忙。
(pic1中的30119999.xml,具有齿轮标记的名字)
我在Web Worker中设置了此请求,响应数据正常,并在onmessage回调中将其终止
但是为什么请求总是处于待处理状态而无法预览,请提供帮助。
伪代码:
const workerBlob = new Blob([`onmessage = function (event) {
const xhr = new XMLHttpRequest();
xhr.addEventListener('load', function () {
postMessage(xhr.response);
});
xhr.open('GET', event.data.url, true);
xhr.send();
}`], { type: 'application/javascript' });
const workerURL = URL.createObjectURL(workerBlob);
const worker = new Worker(workerUrl);
worker.postMessage({url});
worker.onmessage = (message) => {
// do something
worker.terminate();
};
Run Code Online (Sandbox Code Playgroud) 控制器是这样的:
class Abc extends CI_controller{
public function index(){...}
public function f1(){...}
}
Run Code Online (Sandbox Code Playgroud)
如果url是http://host/app/Abc/indexget函数索引
如果url是http://host/app/Abc/f1get函数f1
如果url是http://host/app/Abcget函数索引因为它是默认的
但是如果url是http://host/app/Abc/f2它打印404找不到
我预计如果url是http://host/app/Abc/f2可以转向索引功能.
如果不能这样做,我想自动添加新功能,我该怎么办?
编辑
我想在一个特定的类中使用它,我可以编辑全局路由吗?怎么样?