cose-bilkent layout extension of cytoscpae.js - cytoscape.js

I have been using cytoscape.js library to develop an application, but the extension layout cose-bilkent is working fine in google chrome, but the same code gives an error in Internet Explorer.
I am getting SCRIPT5009: 'Set' is undefined error in th IE debugger. Please advise what I might be missing.
Image with error in cose-bilkent.js file

This is a very common mistake (not yours, its the ie that is broken). IE doesn't support either Map or Set (expect for their "basic support"). You can see that here.
import 'core-js/es6/map';
import 'core-js/es6/set';
If you want to use it, there may be some workarounds with requireJS or polyfill, but using edge or ANY other browser than good ol' IE would do the trick...

Related

Why is PhantomCSS moving the HTML elements around?

Problem: when I use a visual regression testing tool such as PhantomCSS, the screenshots produced contain the website with dramatically moved HTML elements.
Problem image:
How it should really look like: (taken from esfiddle.net )
Tools: PhantomCSS. The same problem happens with BackstopJS.
What can I do to prevent the problem image?
The flex CSS property is causing the problems.
Since version 3 backstop supports chrome as engine, so you could specify
"engine": "chrome"
I think it would work fine in Chrome.

Javascript split working incorrectly in IE

I have one page checkout. My OPC works fine with other browsers but I get a fatal error with IE. IE's Javascript console says Object doesn't support this property or method.. The method in question is var items = field_name.split(reg) from the file: order-address.tpl.
I have no idea what is causing the problem. Because of this error, I cannot login properly from one page checkout when using IE. It seems that there are a lot of people with the same problem. What's the issue?
This error is present in 1.4.9, 1.4.10, and 1.5.3.
SOLVED. It turns out the issue is not with coding but with settings of IE.
All I had to do was reset IE from Tools => internet options => advanced => reset (including personal settings)
That did it for me. Thank you altafhussain for trying to help me out.

chrome.extension.onMessage is undefined

I have a simple plugin that just does something like this:
chrome.extension.onMessage.addListener(function(msg, _, sendResponse) {
log("Got message from background page: " + msg);
});
unfortunately when my panel is loaded the following error is shown:
TypeError: Cannot call method 'addListener' of undefined
and according to my tests chrome.extension.onMessage is undefined
According to this page http://code.google.com/chrome/extensions/messaging.html I should be able to access this chrome API from my page so it has to be something small that I am missing here...
Please note methods chrome.extension.onRequest and chrome.extension.sendRequest, as originally suggested in this answer, are deprecated as of Chrome 33.
You should use
chrome.extension.onRequest
instead of
chrome.extension.onMessage
And in background page or any other extension scripts:
chrome.tabs.sendRequest
instead of
chrome.tabs.sendMessage
( the documentation is outdated... alert to google team ;) )
Just a side note: the Yandex browser (mostly oriented for Russians) which is also based on Chromium still (as of 11/10/2012, ver. 1.0) has the .*Request methods instead of .*Message. Many thanks to Ciprian Amariei for the tip, it saved me a lot of time!
PS: This should actually be a comment to Ciprian Amariei's answer but unfortunately I can't leave comments yet and I though this information could be very helpful to those who develop extensions for Yandex browser.
Make sure you're using the latest Google Chrome version. Older versions don't have the chrome.extension.onMessage API.

ReportViewer cannot shown in Firefox8 and Chrome15

I have an asp.net mvc3 project, it has some reports in aspx web pages. Everything works great in 2-3 weeks ago, but now, when I open the reports pages in FireFox8 and Chrome 15, the reports can not be displayed correctly.
In FF8, report content can be shown, but looks like css doesn't loaded, and report head control look like this:
In Chrome15, report head looks fine but content isn't shown up. I can see it has correct contents when using Firebug to view those .
Since data can ben loaded to browser, I think it maybe a browser compatibility problem, am I right?
Does anyone seeing same issues? I'm open to any suggestions.
BTW:My report viewer's version is 10.0.0.0.
Thanks.
[Edit in 12/21/2011]
FireFox
After several research on this, I have noticed when browse in firefox, server will catch an [Microsoft.Reporting.WebForms.HttpHandlerInputException: Missing URL parameter: Name], and the query string is OpType=BackImage&Version=10.0.40219.329&Color=%23ECE9D8&Name=Microsoft.Reporting.WebForms.Icons.toolbar_bk.png; path_info is Reserved.ReportViewerWebControl.axd
This may be the reason why firefox can't show page with correct CSS.
I don't know why this happens in Firefox & Chrome, while in IE everything is fine.
I've found this link shows same excpetion: http://social.msdn.microsoft.com/Forums/eu/vsreportcontrols/thread/80ce3ee8-e65b-476c-b668-ecc8e83ea73d
But I'm not sure how did he solve this, can you or somebody else gives some tip or example code to solve this?
Chrome
When browse in chrome, I found the report data is loaded into DOM, and surronded by a with id="ReportViewer1_fixedTable". Inside that element, there's a div with id="ReportViewer1_ctl09" nested in , if I remove the "height: 100%", the report can be seen.
this link http://www.apptools.com/examples/tableheight.php, explained why this 100% cannot be rendered correctly, but I'm still failed when trying to give a fixed height via CSS, the code can't be pasted here, please see this as a reference.
Thanks.
In Chrome, it's the "height=100%" problem.
Once I add following jQuery code, the report area can ben shown.
$(function () {
$("#ReportViewer1_ctl09").css("height", "auto");
});
In FireFox, the report page raise an error as following:
"Microsoft.Reporting.WebForms.HttpHandlerInputException 缺少 URL 参数: Name"
and the Query String is: "OpType=BackImage&Version=10.0.40219.329&Color=%23ECE9D8&Name=Microsoft.Reporting.WebForms.Icons.toolbar_bk.png"
according to this article, I think it's caused by a proxy that handles http request..
I checked my request, there's a "FiftyOne ..." in "Brwoser" property of "Request" ojbect.
Since fifty one is no longer used in this project, I removed it from Bin and web config, then the report can be shown in FireFox!
Hope this article can be usefule to other guys.

Not correct page breaks if print from IE COM interface IWebBrowser

I have HTML document to print from embedded COM IWebBrowser object.
And although in IE itself it printed with correct page breaks (by page-break-inside in CSS).
In my application it make it wrong.
I'm already dig it much. Can you suggest something?
I don't know if this is your scenario (since it is a bit ambiguous), but I had an IE page being generated by Javascript, using the DOM and found in some cases that Javascript (or IE's DOM) was adding breaks after every append, or some such, where it wasn't supposed to. I was able to work-around the problem by building my string in memory first, and only sending it where it was needed once the string was completely built.
You may use print templates for control your printing flow.
It may have to do with the DOCTYPE.