This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Keep the URL the same so the browser sees it as the same. | |
channel.originalURI = aRequest.URI; | |
channel.asyncOpen(proxy, aContext); | |
var securityManager = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager); | |
log('got secruity manager!'); | |
var uri = ioService.newURI('resource://pdf.js/web/viewer.html', null, null); | |
var principal = securityManager.getCodebasePrincipal(uri); | |
log('created principal!'); | |
channel.owner = principal; | |
log('hey we changed the owner!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
#container { | |
background-color: red; | |
position: relative; | |
width: 100%; |