资源说明:A hack implementation of a way to track and fetch tab & pagemod workers
# Worker / Tab tracking, done wrong This is a quick hack to implement a 'tracker' module that tracks workers attached to tabs and allows workers to be fetched and worked with. Usage: const Tracker = require("worker_manager").Tracker; const tabs = require("tabs"); let test_tracker = new Tracker(); for each (let tab in tabs) { let worker = tab.attach({ contentScript: 'self.port.on('say-hello', function(message) { alert(message); }', }); test_tracker.register(worker); } test_tracker.emit(tabs.activeTab, "say-hello", "Hello World");
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。