Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: chrome_frame/cfinstall/src/miniclosure/style.js

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // A drop-in replacement for one method that we could use from Closure.
6
7 goog.provide('goog.style');
8
9 /**
10 * Creates a style sheet in the document containing the passed rules.
11 * A simplified version that does not take an optional node parameter.
12 * @param {string} rules
13 */
14 goog.style.installStyles = function(rules) {
15 try {
16 var ss = document.createElement('style');
17 ss.setAttribute('type', 'text/css');
18 if (ss.styleSheet) {
19 ss.styleSheet.cssText = rules;
20 } else {
21 ss.appendChild(document.createTextNode(rules));
22 }
23 var h = document.getElementsByTagName('head')[0];
24 var firstChild = h.firstChild;
25 h.insertBefore(ss, firstChild);
26 } catch (e) {
27 // squelch
28 }
29 };
OLDNEW
« no previous file with comments | « chrome_frame/cfinstall/src/miniclosure/base.js ('k') | chrome_frame/cfinstall/src/stub/cf-activex-externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698