Error resizing browser window in chrome extension

65 Views Asked by At

I am developing a chrome extension and I wanted to resize the browser window to a specific size. I am using the chrome.windows.update method. This is the following code

chrome.windows.getLastFocused(function (window) {
  var updateInfo = {
    width: 700,
    height: 600,
    top: 50,
    left: 100,
  };
  (updateInfo.state = "normal"),
    chrome.windows.update(window.id, updateInfo);
});

It does resize the window, but it resizes to 614x375 (on brave) and 544x433 (for chrome).

I am using manifest version 3.

Not sure where am i going wrong. Can you please help me out.

TIA.

0

There are 0 best solutions below