Skip to content

Commit

Permalink
Add openURLInBrowser
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasbento committed May 14, 2019
1 parent 7afdfcd commit 4210fa8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Libraries/Core/Devtools/openURLInBrowser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/

'use strict';

const getDevServer = require('./getDevServer');

function openURLInBrowser(url: string) {
fetch(getDevServer().url + 'open-url', {
method: 'POST',
body: JSON.stringify({url}),
});
}

module.exports = openURLInBrowser;

0 comments on commit 4210fa8

Please sign in to comment.