File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,21 @@ define([
69
69
document . getElementsByTagName ( "head" ) [ 0 ] . appendChild ( link ) ;
70
70
}
71
71
72
+ /**
73
+ * append css for div
74
+ * @param {string } divSelector
75
+ * @param {string } url
76
+ */
77
+ var loadCssForDiv = function ( divSelector , url ) {
78
+ $ ( '<link>' )
79
+ . appendTo ( divSelector )
80
+ . attr ( {
81
+ type : 'text/css' ,
82
+ rel : 'stylesheet' ,
83
+ href : requirejs . toUrl ( url )
84
+ } ) ;
85
+ }
86
+
72
87
/**
73
88
* VisualPython container selector (jquery selector)
74
89
* @returns vp top container selector
@@ -347,6 +362,7 @@ define([
347
362
loadHtml : loadHtml
348
363
, getUUID : getUUID
349
364
, loadCss : loadCss
365
+ , loadCssForDiv : loadCssForDiv
350
366
, getVPContainer : getVPContainer
351
367
, wrapSelector : wrapSelector
352
368
, addVariable : addVariable
You can’t perform that action at this time.
0 commit comments