microsoft-edge

Edge ignores script-src in Content Security Policy

删除回忆录丶 提交于 2020-01-04 09:38:13
问题 I have the following Content Security Policy value="default-src 'self' style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://svc.webspellchecker.net; img-src 'self' data: https://s3.amazonaws.com; frame-src 'self' *.salesforce.com *.force.com;" This works fine in Chrome and Firefox. In Edge it is not running because we have some inline scripts (ie onClick="foo() ). My understanding is the the default-src sets the defaults and the script-src should override

How can the total memory usage of MS edge keep growing after Dom Object are removed?

流过昼夜 提交于 2020-01-04 05:16:06
问题 I have a memory "leak" problem in Microsoft Edge browser. When I run a memory profiling session and take several snapshots, I see the memory between snapshot being freed. but the total memory consumption keep growing (see image). The memory difference between snapshots are an iframe being add and then removed from the DOM. How is this possible ? 回答1: I have been using the Edge memory profiler to try to test memory leaks with an iFrame as well. We found that the Edge profiler itself leaks

last-of-type doesn't work with custom elements in IE11 and Edge

早过忘川 提交于 2020-01-03 15:32:12
问题 .foo bar:last-of-type { background-color: red; } <div class="foo"> <bar>bar</bar> <bar>bar</bar> <bar>bar</bar> <span>span</span> </div> <div class="foo"> <bar>bar</bar> <bar>bar</bar> <bar>bar</bar> <baz>baz</baz> </div> The last bar appears red in both cases in Chrome and Firefox. In IE11 and Edge, however, it doesn't work in the second scenario. What's going on? 回答1: IE appears to be treating all unknown elements as being the same element type. If you remove the bar type selector, you'll

last-of-type doesn't work with custom elements in IE11 and Edge

我们两清 提交于 2020-01-03 15:31:12
问题 .foo bar:last-of-type { background-color: red; } <div class="foo"> <bar>bar</bar> <bar>bar</bar> <bar>bar</bar> <span>span</span> </div> <div class="foo"> <bar>bar</bar> <bar>bar</bar> <bar>bar</bar> <baz>baz</baz> </div> The last bar appears red in both cases in Chrome and Firefox. In IE11 and Edge, however, it doesn't work in the second scenario. What's going on? 回答1: IE appears to be treating all unknown elements as being the same element type. If you remove the bar type selector, you'll

A :focus-within workaround for edge

强颜欢笑 提交于 2020-01-03 08:52:41
问题 I am currently using the pseudo selector :focus-within in chrome however according to caniuse.com it's unavailable in Edge and IE, I found a neat workaround on codepen for it: .focus-within-class > input:focus However it combining it with focus-within like: .focus-within > input:focus, .focus-within:focus-within > input does not work in Edge and the following solution does not work in chrome: .focus-within > input:focus How can I make :focus-within cross browser? 回答1: Couple of things. First,

A :focus-within workaround for edge

烈酒焚心 提交于 2020-01-03 08:52:32
问题 I am currently using the pseudo selector :focus-within in chrome however according to caniuse.com it's unavailable in Edge and IE, I found a neat workaround on codepen for it: .focus-within-class > input:focus However it combining it with focus-within like: .focus-within > input:focus, .focus-within:focus-within > input does not work in Edge and the following solution does not work in chrome: .focus-within > input:focus How can I make :focus-within cross browser? 回答1: Couple of things. First,

On an input[type='number'] Edge always returns `NaN` for `valueAsNumber`

强颜欢笑 提交于 2020-01-03 08:27:08
问题 The following works fine in Chrome and Firefox, however in Edge it will alert NaN no matter the input document.querySelector('button').addEventListener('click', function(){ alert(document.querySelector('input').valueAsNumber); }); <input type='number' value='34'> <button> Alert number </button> Now, I am not asking how to fix this (using parseFloat(el.value) does that trick), I am asking however what Edge did implement valueAsNumber for then if the most basic function doesn't seem to work. As

PDF File generated using jsPDF doesn't show on Microsoft Edge

孤街醉人 提交于 2020-01-03 06:27:08
问题 I'm currently working on a project, where I have to generate a report on a button click using jsPDF. The code works perfectly fine in Google Chrome and Mozilla Firefox but doesn't work on Microsoft Edge. The PDF document loads in an iframe in the background but the page is white and blank. Can anyone suggest a solution for displaying the PDF correctly in Microsoft Edge? Note: I cannot share the code because it causes copyright infringement. I'm sorry. Also, the debugger shows no such

How to determine if Microsoft Edge is the default browser?

半城伤御伤魂 提交于 2020-01-01 11:58:07
问题 Is there a reliable, programmatic way to determine that Microsoft Edge is the default browser? I know one option would be to use the IApplicationAssociationRegistration::QueryCurrentDefault method to return the default application registered for http. It's unclear that the ProgID returned by this call is a fixed string though so it may not be the best way to verify that Edge is indeed the default browser. 回答1: Use the following code snippet. Haven't tested with Firefox or any of the other

Alpha becomes black when coming from clipboard on Mozilla Firefox and MS Edge

烂漫一生 提交于 2020-01-01 05:55:38
问题 I'm using a code from here to paste images from clipboard on a page. It works fine in all browsers (Chrome, Firefox, Edge and Opera). The problem is: when the image is a PNG or GIF with alpha channel (transparent areas), the alpha becomes black in Firefox and Edge. Here's the code snippet (or jsfiddle if you prefer): document.getElementById('pasteArea').onpaste = function (event) { // use event.originalEvent.clipboard for newer chrome versions var items = (event.clipboardData || event