gecko

Fixing site size in FireFox vs Chrome on large screens

放肆的年华 提交于 2019-12-12 10:47:52
问题 It seems that Gecko, Trident and Webkit have a different way of displaying web pages on high resolution screens. Webkit browsers like Chrome and the new Opera will zoom the page out to match the pixel resolution of the screen. However, this might make small text very hard to read. Firefox and Internet Explorer, on the other hand, seem to have some default size, and if the resolution is bigger, they will pretend the screen has a lower resolution, and instead use the extra pixels to enhance

Firefox 53 launched with gecko 0.16.1 but fail to connect to internet

怎甘沉沦 提交于 2019-12-12 05:49:24
问题 I'm using the following configuration: Win 10 64-bit VS Enterprise 2017 C# testing project Firefox 53.0.3 (64-bit) Gecko driver geckodriver-v0.16.1-win64 Selenium.WebDriver v3.4.0 and this snippet: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using OpenQA.Selenium; using OpenQA.Selenium.Firefox; namespace Test { class Program { static void Main(string args) { IWebDriver driver = new FirefoxDriver(); driver.Navigate()

How to load another JQuery version from GeckoWebBrowser control

做~自己de王妃 提交于 2019-12-12 02:47:14
问题 I use Gecko Browser in C#. The following code shows that jQuery is loaded. GeckoWebBrowser GWB = new GeckoWebBrowser ..... bool JSExec; string JSresult = ""; string JStext = @"alert(jQuery.fn.jquery);"; using (AutoJSContext JScontext = new AutoJSContext(GWB.Window.JSContext)) { JSExec = JScontext.EvaluateScript(JStext, (nsISupports)GWB.Window.DomWindow, out JSresult); } Alert box display 1.4.4 Is it possible to load a newer version of jQuery? Eg 2.0.2 => https://ajax.googleapis.com/ajax/libs

How do I use the Dom File API from privileged code?

穿精又带淫゛_ 提交于 2019-12-12 01:54:43
问题 I'm working on a restartless firefox addon. Using firefox developer edition v36. The MDN page on the Dom File API claims that you can import File as: const {File, Services} = Cu.import('resource://gre/modules/Services.jsm', {}); But Services.jsm clearly does not export a File Object. I also tried: new contentWindow.File( filename ) But this gives a very descriptive NS_ERROR_FAILURE. Any clues are welcome, thanks 回答1: Try this: Cu.importGlobalProperties(["File"]); MDN :: Components.utils

How to add button in toolbar of print preview fire fox using add SDK

亡梦爱人 提交于 2019-12-12 01:32:19
问题 How to add button in toolbar of print preview fire fox using add SDK. thank you so much 回答1: function addToolbarButton() { var {Cc, Ci, Cu} = require("chrome"); var mediator = Cc['@mozilla.org/appshell/window-mediator;1'].getService(Ci.nsIWindowMediator); var document = mediator.getMostRecentWindow("navigator:browser").document; var navBar = document.getElementById("print-preview-toolbar"); if (!navBar) { return; } var btn = document.createElement("toolbarbutton"); btn.setAttribute('type',

vb net: How to handle a Gecko.DOM.GeckoInputElement click event

有些话、适合烂在心里 提交于 2019-12-11 18:25:43
问题 Is there a way to handle Gecko.DOM.GeckoInputElement click event? I have a submit button in a tag and I'd like to rise an event when I click it with the mouse. The website is open in a Gecko Browser. I'm useing xulrunner-29.0b2.en-US.win32 and GeckoFx-Windows-29.0-0.1 My code is: Friend WithEvents inputElement As Gecko.DOM.GeckoInputElement Private Sub inputElement_click() Handles inputElement.Click MsgBox("a") End Sub but obviously "inputElement.Click" doesn't exists. 回答1: The easiest way to

Gecko NSModule: ContractIDEntry “nsID const *”?

穿精又带淫゛_ 提交于 2019-12-11 14:54:00
问题 I created a FireFox addon a while a go, and noticed it stopped working on FireFox 3.6 Apparently, NSGetModule is being replaced with an NSModule structure, so I have to adapt. I'm coding my product with Delphi, so I have to port the new code to Object Pascal. If I look over this code: http://mxr.mozilla.org/mozilla-central/source/xpcom/components/Module.h I notice that the "cid" property of the ContractIDEntry struct, is defined as nsID const * Does this mean that there's a pointer to a nsID

Method to block image, flash, style when use gecko navigate?

為{幸葍}努か 提交于 2019-12-11 11:59:27
问题 I need to make a bot "get video link" from abc.. I use httpwebrequest and httprespone but I realize this website has ajax text and httpwebsite can't get it. -> I decide to use geckowebrowser Step by step 1. use geckowebrowser documentcomplete event and use navigate to website 2. use geckobutton to click and wait 5 seconds to get ajax text -> It success but too slow, it delay to load style, image, flash, etc so I try to search and I get this "DOMContentLoaded event fires when the DOM is loaded

How to get source HTML from gecko web browser? InnerHtml does not exist any more

风流意气都作罢 提交于 2019-12-11 05:35:58
问题 GeckoFx v22 GeckoElement element = null; var geckoDomElement = WebBrowser1.Document.DocumentElement; if(geckoDomElement is GeckoElement) element = (GeckoElement)geckoDomElement ; var innerHtml = element.InnerHtml; but there is no more InnerHtml method. How to get source HTML from gecko web browser? 回答1: Cast to GeckoHtmlElement instead of a GeckoElement. GeckoHtmlElement element = null; var geckoDomElement = WebBrowser1.Document.DocumentElement; if(geckoDomElement is GeckoHtmlElement) {

Transfer large files using HTTP/POST

ぐ巨炮叔叔 提交于 2019-12-11 04:35:30
问题 How can I upload (very) large file with HTTP protocol in C (or C++)? I know it's not the right way to upload huge files, but that's not the point. I've already seen sources about POST transfers of files in C++ but I noticed that, each time, the WHOLE binary file was included inside the POST sequence (between "--boundary"). So, before going deeper and deeper into Webkit/Gecko source code, does somebody know how do they do? 回答1: You may use "Content-Range" header in HTTP POST request, to upload