1 | /**
|
2 | * Copyright (c) 2013-present, Facebook, Inc.
|
3 | *
|
4 | * This source code is licensed under the MIT license found in the
|
5 | * LICENSE file in the root directory of this source tree.
|
6 | *
|
7 | */
|
8 |
|
9 | /* globals MSApp */
|
10 |
|
11 | ;
|
12 |
|
13 | /**
|
14 | * Create a function which has 'unsafe' privileges (required by windows8 apps)
|
15 | */
|
16 |
|
17 | var createMicrosoftUnsafeLocalFunction = function (func) {
|
18 | if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
|
19 | return function (arg0, arg1, arg2, arg3) {
|
20 | MSApp.execUnsafeLocalFunction(function () {
|
21 | return func(arg0, arg1, arg2, arg3);
|
22 | });
|
23 | };
|
24 | } else {
|
25 | return func;
|
26 | }
|
27 | };
|
28 |
|
29 | module.exports = createMicrosoftUnsafeLocalFunction; |
\ | No newline at end of file |