문제

I want to use web workers in a javascript code module that load code from a blob. Typically this could be done in a webpage by calling "window.URL.createObjectURL" on the blob and giving the url generated by createObjectURL to the worker. Is this possible in a javascript code module, despite there being no window.URL object?

도움이 되었습니까?

해결책

You can import the URL constructor

Components.utils.importGlobalProperties(['URL']);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top