toolbar.js chrome-extension protocol should be replaced. recommend using getExtensionProtocol() - defined in API bridge

By design Issue #9170216

Details

Author
Rayhaan S.
Created
Oct 3, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Status to “By design”

    • Thank you for the feedback. We assume that there there is no bug being reported, instead this just an information only comment.

      All the best,
      The MS Edge Team

    • I’m brazilian, so my english is not very good… So…

      I think the reason for the error message is, In conversion, all the protocol “chrome-extension://” should be converted to “ms-browser-extension://”. So if the string expression “chrome-extension” is found will return the error “chrome-extension protocol should be replaced. recommend using getExtensionProtocol() - defined in API bridge”.

      The getExtensionProtocol() function will return the correct string protocol: if “typeof browser” is undefined return “chrome-extension://”, otherwise return “ms-browser-extension://”.

      So, to correct the error simply replace the occurrences of the expression “chrome-extension” by the function getExtensionProtocol(). For example:
      js x.indexOf ("chrome-extension://") should be replaced with x.indexOf(getExtensionProtocol())
      or
      x = “chrome-extension” should be replaced with x = getExtensionProtocol().replace (/[\ /:]/ g, “”)

      code

      If you have to return the exact expression “chrome-extension” create a function like
      var returnCE = function () {return "chrome-extension";};
      then replace x = “http://your-url.com/something-chrome-extension.html” with x = "http://your-url.com/something-"+returnCE()+.html".

    You need to sign in to your Microsoft account to add a comment.

    Sign in