-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I had an issue with using load_css in the back-end, providing an url for the resource.
I did the following workaround
- adding a front-end function loadResource
- using it from the front-end
function loadResource(url,kind, callback){
var res = null;
if (kind == 'script'){
var found = document.querySelector('[src="'+url+'"]');
if (found == null){
res = document.createElement(kind);
res.type = "text/javascript";
res.src = url;
}
} else if (kind == 'link'){
var found = document.querySelector('[href="'+url+'"]');
if (found == null){
res = document.createElement(kind);
res.rel = "stylesheet";
res.href = url;
}
}
if (res == null){
if (callback == null ){
isloaded(url);
} else {
callback(url);
}
} else {
res.onload = function(){
if (callback == null ){
isloaded(url);
} else {
callback(url);
}
};
document.getElementsByTagName("head")[0].appendChild(res);
}
}
loadResource('https://unpkg.com/bpmn-js@8.8.2/dist/assets/diagram-js.css','link',null);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels