New issue
Advanced search Search tips

Issue 783757 link

Starred by 7 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Enhancement


Previous locations:
monorail:3184


Sign in to add a comment

module script support for content scripts and chrome.tabs.executeScript

Reported by gootvili...@gmail.com, Nov 6 2017

Issue description

What do you want?
I want to be able to write es6 modules enabled content scripts. To have the option to do something like
# in background page
chrome.tabs.executeScript(tabId, {file: "./path/module.js", module: true}, ...)
# or in manifest
{
...
  "content_scripts": [
    {
      "matches": "some-url",
      "modules: [ ... list of module files ... ]
    }
   ],
...
}

The scripts will be evaluated as module scripts and the resolution of modules will be in the context of the extension and not the injected page's context.

Why do you want it?
Because it will be awesome :-).
Since es6 modules landed and available for extensions background pages (at least very soon) having also support for using modules in content scripts will give all round nicer extension development experience and will make content scripts a first class citizens.
 

Comment 1 by aga...@chromium.org, Nov 10 2017

Project: chromium
Moved issue monorail:3184 to now be issue chromium:783757.

Comment 2 by aga...@chromium.org, Nov 10 2017

Components: Platform>Extensions
Status: Untriaged (was: New)
Issue moved from a project with a different set of status labels. "New" is not a supported status in /p/chromium, so these ended up in a black-hole.
Cc: rdevlin....@chromium.org sime...@chromium.org
Components: -Platform>Extensions Platform>Extensions>API
Labels: OS-Chrome OS-Linux OS-Mac OS-Windows Pri-2
Status: Available (was: Untriaged)
simeonv@ and I were just chatting about this recently.  I think it's something that's interesting, and we should investigate more.  That said, we don't currently have concrete plans for adding this.

Sign in to add a comment