Notify ActiveX that <object> has been removed from DOM - activex

This is a bit necroposting but I'm out of luck here.
How do I get notified in my ActiveX COM that node has been removed from the DOM through parent.innerHTML = '' or parent.removeChild(activeXID)
FireBreath seems to be doing it somehow

FireBreath doesn't really support being removed and added again, but I think it is either with InPlaceDeactivate or SetClientSite somehow; you'd just have to set some breakpoints and play with it. The file you need in FireBreath is FBControl.h

Related

Trying to use Edgewebbrowsers SubscribeToCDPEvent

Delphi has a demo with EdgeBrowser
I am trying to Subscribe to DevToolsProtocol using the follow.
EdgeBrowser.SubscribeToCDPEvent('Log.enable');
EdgeBrowser.SubscribeToCDPEvent('Log.entryAdded');
but EdgeBrowserDevToolsProtocolEventReceived never fires.
Any help?
EdgeBrowser1.DefaultInterface.OpenDevToolsWindow;
starts DevTools
Remember, the WebBrowser component does not have this command, it only exists in the EdgeBrowser component.

What is the correct way to isolate cookies/users in Chromium embedded browser?

I have searched for days with no solution in sight.
I need multiple Chromium instances in one single application and each of this instance logins to the same site with different account (ex: outlook.com).
I tried this solution but there's no "OnGetCookieManager" event in DECF3 new version. Apparently there was a related bug and event onGetCookieManager was removed in the 1547 CEF3.
I tried this but it doesn't work too.
Is this really possible? How?
I'm using DCEF3 (revision: 0cc175e7a629) and Delphi XE3.
Here's what CEF3 maintainer told me:
"Cookies can be stored globally, per request context or something else entirely. It depends on whether you pass a CefRequestContext to CreateBrowser*() and what you return from CefRequestContextHandler::GetCookieManager."
I'm not entirely sure how CreateBrowser is exposed in Delphi (I only use the C++ API), but I can confirm that GetCookieManager still exists in trunk (as the only method of CefRequestContextHandler).

Automatic Typing Textarea/input/form in JavaScript

I've been searching for a way to make a textarea type inside of itself. Unfortunately, even with some google searching, I still don't have a clue? Do you guys know where to start with this?
http://lmgtfy |dot| com is an example, but I'm not sure if they use some other technique...
The lmgtfy people are simply using javascript to change the value of the input. Here is a simple jsfiddle showing the same thing:
http://jsfiddle.net/Caut6/1/
LMGTFY uses javascript. If you visit the site using chrome or some other browser with a debugger, you should be able to pause javascript execution and check out how they do it, then roll or copy your own version.
In Chrome, the pause button is under the Scripts area. Their bundle.js files appears to host the JS you are looking for, it is around 1000 lines of code, but you should be able to see the few functions you need to borrow their implementation.
Hope this helps.

FireFox 6: implementing nsIProtocolHandler

Has something changed in Firefox 6 so I can no longer add my nsIProtocolHandler (and nsIChannel) implementation from an add-on just by registering it under a contract like #mozilla.org/network/protocol;1?name=myscheme?
I've checked all the interfaces I use if any changed (judging by a new
UUID), but I don't get a call to my getFactoryProc I list in NSModule,
like I did before.
Do I need to add a category (like http-startup or something?) or is
something else wrong?
(the code that worked in firefox 3.6 is still here I haven't committed
the new code yet...)
Update: I've logged this as a bug.
Update: Okay, I figured this out. See https://bugzilla.mozilla.org/show_bug.cgi?id=656331. Basically you need to export the right kVersion value in your module or the library will be unloaded immediately after it is loaded (i.e. the behavior you are observing). This behavior is new as of Firefox 5.
If you haven't updated to Firefox 4 yet then you need to change the way that you register your XPCOM component. See https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0. The sections on JS components or binary components are relevant depending on whether your component is implemented in JS or C++.

Open node in Umbraco programmatically

I have created a dashboard for an Umbraco site and I want to link from it to various node in the tree.
From what I can tell Umbraco uses editcontent.aspx?id={thenodeid} and javascript:opencontent({nodeid}).
Whenever I try to use these they always fail.
Does anyone know how to open a display a node in the Umbraco back end?
Like Tim Saunders said you really just need to target the correct iframe. The openContent function looks like this:
function openContent(id) {
parent.right.document.location.href = 'editContent.aspx?id=' + id;
}
So you need to target the 'right' iframe.
I've tested editContent.aspx?id=1234 on my Umbraco installation and it seems to work correctly.
I'm assuming you are replacing {thenodeid} with the actual node id you want?
Umbraco uses iFrames in the backend for the content tree and the content areas etc. This means that you do not always have full access to the Javascript libraries from the frame that you are in.
Therefore you may need to either include the library in the page you are working with or try and reference the method calls by walking up the dom.
I can't find any documentation for this so it may be a case of looking at the HTML source and working out what is going on.

Resources