From 0d3541aec2cbb3010c15e2cec227cfdb271af362 Mon Sep 17 00:00:00 2001 From: NN Date: Thu, 26 Feb 2015 08:26:30 +0200 Subject: [PATCH] Add global chrome object through window It allows to add a check for existence of 'chrome' object. Without it the strict mode can complain about undefined variable. --- chrome/chrome.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chrome/chrome.d.ts b/chrome/chrome.d.ts index e77f744faa..cbabf893ae 100755 --- a/chrome/chrome.d.ts +++ b/chrome/chrome.d.ts @@ -5,6 +5,13 @@ /// +//////////////////// +// Global object +//////////////////// +interface Window { + chrome: typeof chrome; +} + //////////////////// // Alarms ////////////////////