How to set InappBrowser to Landscape and then unlock?

I have redefined my apps onclick event to use the InAppBrowser plugin to open external links. Originally i wanted it to open these in landscape mode even though my app is locked to portrait mode. This was pretty simple:

screen.orientation.lock(‘landscape’);

sets to landscape when entering my onclick function and then set it back to portrait when i left the InAppBrowser.

I now want to do this a little different and i want to open links in landscape mode; but, while in the inappbrowser i want to allow device rotation (and then when leaving browser, return to locked in portrait mode as i had previously).

this seemed like it should work:

   screen.orientation.lock('landscape')
        .then(function() {
          screen.orientation.unlock();
        });

but, although it does allow screen rotation while in browser; it starts in portrait mode as opposed to landscape.

What am i missing here?