The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
var timeoutId = 0; | |
var timeouts = {}; | |
var worker = new Worker("/static/timeout-worker.js"); | |
worker.addEventListener("message", function(evt) { | |
var data = evt.data, | |
id = data.id, | |
fn = timeouts[id].fn, | |
args = timeouts[id].args; |
// Copyright © 2010-2014 The CefSharp Authors. All rights reserved. | |
// | |
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. | |
using System; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using CefSharp.Example; |