title: Chrome extension "all_frames" is invalid
body: <h2>Question</h2>
  
  <p>I tried to make a plugin to help modify the <code>navigator.platform</code>, in the main page(the web browser requested page) is well, but I found that if there is a <code>iframe</code> in the page, <code>iframe</code> in the page will not be modified by my <code>content_scripts.js</code>, although I have to set up in the <code>manifest.json</code> file all_frames: true`. This is why?</p>
  
  <h2>manifest.json</h2>
  
  <pre><code>{  
      "name": "Platform Modifier",  
      "version": "1.0.0.0",  
      "manifest_version":2,
      "default_locale": "en",
      "permissions": ["tabs", "webRequest", "webRequestBlocking", "&lt;all_urls&gt;"],
      "background":{
          "persistent":true,
          "scripts":["bg.js"]
      },
      "browser_action": {
          "default_icon": "icon.png" ,
          "default_title": "Platform Modifier",
          "default_popup": "popup.html"
      },
      "content_scripts": [{
          "matches": ["*://*/*"],
          "all_frames": true,
          "js": ["content_scripts.js"],
          "run_at":"document_start"
      }],
      "web_accessible_resources":[
          "insert-script.js"
      ]
  }
  </code></pre>
  
  <h2>content_scripts.js</h2>
  
  <pre><code>var xmlhttp = null;
  var url = chrome.extension.getURL("insert-script.js");
  
  if (window.XMLHttpRequest){
      xmlhttp=new XMLHttpRequest();
  }
  
  if(xmlhttp == null){
      console.log("not support XMLHTTP")
  }else{
      xmlhttp.onreadystatechange=state_Change;
      xmlhttp.open("GET",url,true);
      xmlhttp.send(null);
  }
  
  function state_Change(){
      if(xmlhttp.status == 200){
          chrome.extension.sendRequest({op: "getAll"}, function(response) {
              var replaceList = {
                  "TAG_PlatForm":response.value.platform,
                  "TAG_UserAgent":response.value.userAgent
              };
              var sc=document.createElement("script");
              sc.type="text/javascript";
              sc.innerHTML= replaceText(xmlhttp.responseText,replaceList);
              var html=document.getElementsByTagName("html");
              html[0].appendChild(sc);
          });
      }
  }
  
  function replaceText(str,regexp){
      for(var key in regexp){
          str = str.replace(key,regexp[key]);
      }
      return str;
  }
  </code></pre>
  
  <h2>insert-script.js</h2>
  
  <pre><code>var myPlatForm = function() {
          return 'TAG_PlatForm';
  };
  var myUserAgent = function() {
      return 'TAG_UserAgent';
  };
  if (Object.defineProperty) {
      Object.defineProperty(navigator, 'platform', {
          get: myPlatForm
      });
      Object.defineProperty(navigator, 'userAgent', {
          get: myUserAgent
      }); 
  } else if (Object.prototype.__defineGetter__) {
      navigator.__defineGetter__('platform', myPlatForm);
      navigator.__defineGetter__('userAgent', myPlatForm);
  }
  </code></pre>
  
  <h2>Complete file</h2>
  
  <p><a href="https://www.dropbox.com/s/wdoenejj2rzr2ko/package.zip?dl=0" rel="nofollow">Download Link</a>, this file contains two parts: <code>extensions.zip</code> is the Chrome extension; <code>testPages.zip</code> is the HTML file for testing. In the test file, open the <code>main.html</code></p>