cross-domain

Open swf file than works with socket

十年热恋 提交于 2019-12-11 05:19:16
问题 Sorry for my bad English. I have the following problem: I have a .fla file, that works with Socket class. There is a server(written in Delphi XE, but it does not matter). I connect to it from my .fla. When i execute my .fla from within Flash Professional CS5 everything works fine. But when i tried to execute resulting .swf from Explorer(Win 7, Flash Player 10) i got an error: SecurityError: Error #2010: Local-with-filesystem SWF files are not permitted to use sockets. at flash.net::Socket

window.opener cross domain call

Deadly 提交于 2019-12-11 05:18:57
问题 I have two subdomains www.example.com and api.example.com . On a page from first domain I open popup window with url api.example.com/some/url and want to use window.opener object to pass data to parent page. But I get error: Unsafe JavaScript attempt to access frame with URL http://www.example.com/some/page from frame with URL http://api.example.com/some/url. Domains, protocols and ports must match. Is it possible to fix the issue? 回答1: It is possible to pass data between www.example.com and

Add a frame to the bottom of a web page using a Greasemonkey script (and set its size)?

北慕城南 提交于 2019-12-11 05:05:01
问题 Is there any way to add a frame to the bottom of a web page using a Greasemonkey script? I want to write a script that adds http://www.google.com at the bottom of every web page, inside a frame. I also want the width and height of the frame to be the same as the height of the page that is inside it. 回答1: This is 3 questions in one. Adding an <iframe> is easy, by itself: $(document.body).append ( '<iframe src="http://{SOME_PAGE_BESIDES_GOOGLE!}.com/">' ); But, Google will not let you load it

Can a service worker fetch and cache cross-origin assets?

巧了我就是萌 提交于 2019-12-11 04:59:06
问题 I'm using some service worker code from the Progressive Web app tutorial by Google but I am getting an error: Uncaught (in promise) TypeError: Failed to execute 'clone' on 'Response': Response body is already used The site uses third-party Javascript and stylesheets for web fonts. I want to add assets hosted on these CDNs to the offline cache. addEventListener("fetch", function(e) { e.respondWith( caches.match(e.request).then(function(response) { return response || fetch(e.request).then

DRY way for setting document.domain from Rails

≡放荡痞女 提交于 2019-12-11 04:47:18
问题 I have a Rails app that is using two subdomains which would like to communicate in JavaScript. What would be the most DRY way to effectively set document.domain = mydomain.com ? Conditions that make it less than straight forward This should not be a problem in the development or test environments where the domain is localhost . This needs to also be set on certain pages which don't load the main JavaScript file Condition 1 leads me to think I either want to rely on a Regex that parses the

Loading Specific Elements Cross Domain

落爺英雄遲暮 提交于 2019-12-11 04:36:09
问题 I am trying to design a web page (PHP) that extracts certain elements loaded up by and external website and displays it in my own format on my website. I have seen many things regarding this, but they all seem to work with a the Same Site Origin Policy only. Another issue is that the first element loaded is a text input that needs to be submitted in order to load up what I'm ultimately trying to retrieve, so how can I got about putting this in my page aswell? Example of layout: Notice that

XMLHttpRequest and setRequestHeader in IE returns an error

…衆ロ難τιáo~ 提交于 2019-12-11 04:23:45
问题 I try to make Cross Domain POST requests and get back JSON encoded responses, everything works fine except in IE 7, 8, 9. I have try those solutions but i get this error: Object doesn't support property or method 'setRequestHeader' Function createXMLHTTPObject() - attempt 1 function createXMLHTTPObject() { var xmlhttp = false; var is_IE = window.XDomainRequest ? true : false; if (is_IE) { xmlhttp = new window.XDomainRequest(); } else { if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest

Firefox Cross Domain images are tainted

隐身守侯 提交于 2019-12-11 04:06:09
问题 This is working in Chrome, but not in firefox. The Access-Control-Allow-Origin is set to *, and images are loaded with a crossOrigin set to anonymous, however when drawing the images onto a canvas in firefox they taint the canvas. The code to load the image is as follows: var image = new Image(); image.onload = loadCallback; image.crossOrigin = "anonymous"; image.src = imageSrc; A few questions: Is there something I am missing that is specific to Firefox? Does it require more headers than

Google oauth javascript cross domain

落爺英雄遲暮 提交于 2019-12-11 03:57:23
问题 On this page: http://code.google.com/apis/accounts/docs/OAuth2UserAgent.html Google gives instructions for doing oauth with client side applications that talk to their apis. One step is to call their token validation api. But if I want to do this from javascript, it would require an ajax request which is cross domain. It seems like with all the improvements to cross domain stuff recently this should be possible, but I'm not figuring it out. Any pointers would be helpful. 回答1: If you want a

How to prevent cross domain issues by proxying in IIS?

只谈情不闲聊 提交于 2019-12-11 03:25:54
问题 I have a site written in Delphi that needs to get data from a .NET web service. In order to consume the web service I am attaching to a .NET web site first that contains a wizard that the end user has to fill out, which in turn is then calling the web service in order to populate AJAX drop-down lists and to return data to the calling Delphi web application. So, to be clear ... Delphi web site opens .NET web site .NET web site populates AJAX drop down lists from .NET web service When user