smuggledPancakes
smuggledPancakes

Reputation: 10323

Is importScripts() only for webworkers?

Can it be used as a means of including code from external .js files outside of the context of webworkers?

Upvotes: 0

Views: 246

Answers (1)

tmcw
tmcw

Reputation: 11882

Is importScripts() only for webworkers?

Yes, this is a webworker-specific API, like onmessage. You can't use it outside of that context.

Upvotes: 1

Related Questions