Call listener from script when listener is in the background.js – chrome extension

I create my extension.

I create a content.js file that inject in the page my “script”.

 var SE = document.createElement('script');
  SE.src = chrome.extension.getURL('SE.js');
  (document.head || document.documentElement).appendChild(SE);

in the SE.js file I get this script. In my seExtID it’s my chrome extension ID because if i do not pass the seExtID i get this error :

Uncaught Error: chrome.runtime.connect() called from a webpage must specify an Extension ID (string) for its first argument

So i pass my extentionID to the sendMessage method

chrome.runtime.sendMessage(seExtID, {
      method: "LoadSettings"
    },
      function (config) {
        defaultSettings = config;
      });

in my background.js file

chrome.runtime.onMessage.addListener(
    function (request, sender, sendResponse) {
      debugger;
      switch(request.method){
        case "SaveSettings":
          var se_json = request.settings;
          localStorage.setItem("se_settings", se_json);
          break;
        case "LoadSettings":
          var obj = JSON.parse(localStorage.getItem("se_settings"));
          sendResponse(obj);
          break;
      }


    }
);

The problem is, if i call my SendMessage from the default_popup or from the content.js it’s work.

In the content.js or in the default_popup, probably the context of the execution already exists, so the seExtID is not needed. I can call my send message witout the seExtID like and it’s work :

chrome.runtime.sendMessage( {
      method: "LoadSettings"
    },
      function (config) {
        defaultSettings = config;
      });

If i take a look on the documentation https://developer.chrome.com/extensions/runtime#method-sendMessage

string (optional) extensionId

The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.

I probably miss something … someone could help me on this one ?