Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / executescript / basic / script3.js
blobf8fcaf04d0b06f6ef0ef3e8aab2aa8f74f2e9452
1 function getStyle(elem, name) {
2 if (document.defaultView && document.defaultView.getComputedStyle) {
3 name = name.replace(/([A-Z])/g, '-$1');
4 name = name.toLowerCase();
6 try {
7 var s = document.defaultView.getComputedStyle(elem, '');
8 return s && s.getPropertyValue(name);
9 } catch (ex) {
10 return null;
12 } else {
13 return null;
17 var bElement = document.getElementById('test2');
18 var display = getStyle(bElement, 'display').toLowerCase();
19 document.title = display;