#### Further consideration in future development of the API
A combined contentScripts/userScripts API would reduce browser load if both CSS & JS need to be injected.
Currently, a single `contentScripts` registration is required to inject CSS & JS.
```js
browser.contentScripts.register({
matches: [hosts],
css: [{code: css}],
js: [{code: js}],
});
```
However if the target is `userScripts`, 2 almost identical registrations/processes have to be created.
```js
browser.contentScripts.register({
matches: [hosts],
css: [{code: css}]
});
browser.userScripts.register.register({
matches: [hosts],
js: [{code: js}]
});
```
Bug 1516478 Comment 9 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
#### Further consideration in future development of the API
A combined contentScripts/userScripts API would reduce browser load if both CSS & JS need to be injected.
Currently, a single `contentScripts` registration is required to inject CSS & JS.
```js
browser.contentScripts.register({
matches: [hosts],
css: [{code: css}],
js: [{code: js}],
});
```
However if the target is `userScripts`, 2 almost identical registrations/processes have to be created.
```js
browser.contentScripts.register({
matches: [hosts],
css: [{code: css}]
});
browser.userScripts.register({
matches: [hosts],
js: [{code: js}]
});
```