Skip to content

Instantly share code, notes, and snippets.

View bwedding's full-sized avatar

bwedding

  • Sweden
View GitHub Profile
@pbojinov
pbojinov / README.md
Last active January 31, 2025 05:04
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@BinaryMuse
BinaryMuse / overrides.js
Created September 20, 2014 08:14
setTimeout via Web Worker
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;
@jankurianski
jankurianski / Program.cs
Created December 9, 2014 04:40
Example of LoadHtml with CefSharp.OffScreen
// 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;