|
|
|
@ -69,6 +69,38 @@ function clipboardCopy(string){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* HTML요소 어트리뷰트(프로퍼티,이벤트) 등록
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
function ObjectInspector(doctx, data){
|
|
|
|
|
let objectInspector = {};
|
|
|
|
|
|
|
|
|
|
if(data == null){
|
|
|
|
|
objectInspector = JSON.parse(document.querySelector("[data-doctx='"+doctx+"']").querySelector("script.objectInspector").text);
|
|
|
|
|
} else if(data instanceof HTMLScriptElement){
|
|
|
|
|
objectInspector = JSON.parse(data.text);
|
|
|
|
|
} else if(typeof data == "string"){
|
|
|
|
|
if(!data.trim().startsWith(String.fromCharCode(123))){
|
|
|
|
|
objectInspector = JSON.parse(document.querySelector("script[id='"+data+"'").text);
|
|
|
|
|
} else {
|
|
|
|
|
objectInspector = JSON.parse(data);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
objectInspector = data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let keys = Object.keys(objectInspector);
|
|
|
|
|
for(let key of keys){
|
|
|
|
|
let elem = document.querySelector("[data-doctx='"+doctx+"'] [name='"+key+"']");
|
|
|
|
|
let attrs = objectInspector[key];
|
|
|
|
|
let attrNames = Object.keys(attrs);
|
|
|
|
|
for(let attrName of attrNames){
|
|
|
|
|
elem.setAttribute(attrName,attrs[attrName]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
* pdf파일 미리보기 창
|
|
|
|
|
**************************************************************************/
|
|
|
|
|