Browse Source

Demo transform

development
Safet Purkovic 4 years ago
parent
commit
00b0efdc69
2 changed files with 30 additions and 1 deletions
  1. 25
    0
      src/PDFEngine.js
  2. 5
    1
      src/index.js

+ 25
- 0
src/PDFEngine.js View File

@@ -0,0 +1,25 @@
const initialize = () => {
document.getElementsByTagName('canvas').forEach(element => element.setAttribute('map','map1'));
document.getElementsByClassName("col-sm-6").forEach(e => e.setAttribute("mapiranje", "map1"));
const paragraf = document.createElement('p');
paragraf.innerHTML = "hajde radi opet";
document.querySelector('body').appendChild(paragraf);
}
const transform = () => {
document.querySelectorAll('[map="map1"]')[1].style.display = "none";
let maliDivovi = document.querySelectorAll('[mapiranje="map1"]');
maliDivovi.forEach(el => { el.className = "col-sm-12" });
let p = document.createElement('p');
p.innerHTML = 'mozda radi';
document.querySelector('body').appendChild(p);
document.querySelector('body').style.backgroundColor = 'red';
}


const PDFEngine = () =>
{
initialize();
transform();
}

export default PDFEngine;

+ 5
- 1
src/index.js View File

@@ -1 +1,5 @@
console.log('hello world')
import PDFEngine from './pdfengine'
(() =>
{
PDFEngine();
})()

Loading…
Cancel
Save