mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-21 08:50:24 +00:00
style(ie-compat): improved generated ie compat code
This commit is contained in:
parent
330d1a870d
commit
106674ac1e
1 changed files with 6 additions and 4 deletions
10
Rakefile
10
Rakefile
|
|
@ -157,11 +157,13 @@ task :generate_ie_compat => :init do
|
|||
# generate a javascript closure that contains a function which will append the generated css
|
||||
# string as a stylesheet to the current html document
|
||||
jsString = "(function(){ \r\n" +
|
||||
" var jsUri = document.location.href.replace(/\\/[^\/]+(#.*)?$/, '/') + " +
|
||||
" document.getElementById('ng-ie-compat').src; \r\n" +
|
||||
" var css = '#{cssString}' \r\n" +
|
||||
" var s = document.createElement('style'); \r\n" +
|
||||
" var jsUri = document.location.href.replace(/\\/[^\/]+(#.*)?$/, '/') + \r\n" +
|
||||
" document.getElementById('ng-ie-compat').src,\r\n" +
|
||||
" css = '#{cssString}',\r\n" +
|
||||
" s = document.createElement('style'); \r\n" +
|
||||
"\r\n" +
|
||||
" s.setAttribute('type', 'text/css'); \r\n" +
|
||||
"\r\n" +
|
||||
" if (s.styleSheet) { \r\n" +
|
||||
" s.styleSheet.cssText = css; \r\n" +
|
||||
" } else { \r\n" +
|
||||
|
|
|
|||
Loading…
Reference in a new issue