Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Dom manipulation in web workers: The future of your mobile web apps

Juan
November 17, 2018

Dom manipulation in web workers: The future of your mobile web apps

Juan

November 17, 2018
Tweet

More Decks by Juan

Other Decks in Programming

Transcript

  1. Hi! I am Juan Lizarazo I ❤ • Open source

    @amphtml • instructor @udemy • engineering @impartnerprm • "# @juanlizarazog
  2. Salt Lake Students can enroll for free!
 Get a code

    from me (after this session) http://bit.ly/jasmine-udemy @juanlizarazog
  3. // worker.js onmessage = function(e) { console.log('Main thread says ',

    e.data); postMessage('Hello from worker thread!'); } @juanlizarazog
  4. // main.js const worker = new Worker('./worker.js'); worker.addEventListener('message', function(e) {

    console.log(e.data); }, false); worker.postMessage('hello world'); @juanlizarazog
  5. “For example, you can't directly manipulate the DOM from inside

    a worker…” - http://bit.ly/about-web-workers @juanlizarazog
  6. Upgrade element Hydration Mutation How does it work? Learn more:

    https://www.youtube.com/watch?v=XyVQfqmx2CI @juanlizarazog