I'm using inspect
inspect({
iframe: false,
});
Is it possible to pass a custom url to the inspect to use the new beta editor?
Also, is it possible to hide the sidebar when opening the visualizer?
Related
The new tab is missing from the browser context menu in Nuxt.js projects. I need to make sure my clients can freely open links in a new tab.
How can I add this feature globally in Nuxt.js?
Do you use the v-btn component with the link prop? https://vuetifyjs.com/en/api/v-btn/#props-link
If the generated HTML is not an actual Go to blog, you will not have it on the context menu.
You could inspect in the DOM and see how it is.
Buttons are for actions, links for navigation.
If it's a link, should be able to open it in a new tab, if it's a button with something like #click="$router.push('/blog')", this won't work with the context menu.
Aurelia Dialog puts all the UI elements for itself at the root of the document (or very near).
Is there a way to configure where the dialog places itself in the document?
(I am trying to make the dialog be part of my router page rather than part of the overall document.)
Yes you can, as stated by the official doc: http://aurelia.io/hub.html#/doc/article/aurelia/dialog/latest/dialog-basics/5
In the controller settings part, there is a config property name host, which you can pass an element here to be anchor for the dialog, instead of the default document.body
doc:
host: allows providing the element which will parent the dialog - if not provided the body will be used.
On Linux I'm creating a webkit window which needs to display a certain URL.
I'm doing that like the following:
GtkWidget *main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
// Create a browser instance
WebKitWebView *webView = WEBKIT_WEB_VIEW(webkit_web_view_new());
// Put the browser area into the main window
gtk_container_add(GTK_CONTAINER(main_window), GTK_WIDGET(webView));
// Load a web page into the browser instance
webkit_web_view_load_uri(webView, "http://example.com");
// Make sure that when the browser area becomes visible, it will get mouse
// and keyboard events
gtk_widget_grab_focus(GTK_WIDGET(webView));
// Show the result
gtk_window_set_default_size(GTK_WINDOW(main_window), 800, 600);
gtk_widget_show_all(main_window);
However, I need to inject some CSS into this to hide a certain checkbox.
How do I inject CSS into the DOM.
I see that I can get the dom like
WebKitDOMDocument *dom = webkit_web_view_get_dom_document(webView);
But from here I can't see how to inject the CSS.
It sounds like the webkit_web_view_run_javascript() answer was a good solution to your specific problem, since you only needed to hide one checkbox.
To answer the general problem of how to inject arbitrary CSS: if you're using a recent version of WebKitGTK+, create a WebKitUserContentManager, call webkit_user_content_manager_add_stylesheet(), and then pass the WebKitUserContentManager when creating your WebKitWebView, either using webkit_web_view_new_with_user_content_manager() or by using g_object_new() manually if you need to set multiple construct-only properties.
Unrelated warning: webkit_web_view_get_dom_document() was removed in WebKitGTK+ 2.6. (The DOM API is only accessible via web process extensions nowadays.) You are using an old, insecure version of WebKitGTK+!
Its not clear which Webkit GTK version you are using, however concepts essentially remain same for both versions. For webkit version 2, its slightly more complicated as DOM manipulation is done on extension side.
You need to reach to the desired element - either by id e.webkit-dom-document-get-element-by-id or by name. This will return you instance of WebElement. If you use by name call, please be ware that there could be multiple elements with same name
From here you can either set the style by setting appropriate style attribute webkit_dom_element_set_attribute or other variations that can deal with styles and css rules.
Or you can take easy option and just execute the javascript that does the same thing by calling webkit_web_view_run_javascript
Is that anyway to Modify firefox (or other browser) element with Watin/VB.Net after it open?
For example, I have a blank html page, then i open that page with Watin. Because its blank so no element loader. Then i want to add element to that page (form or link or image). Is that possible?
Or is it possible to done with memory editing? or maybe javascript?
so far the closest thing that i can find is this javascript
<button onclick="openTab()">Open</button>
<button onclick="closeTab()">Close</button>
<script>
var TAB;
function openTab() {
TAB = window.open("", "TAB");
TAB.document.write("<p>hi</p>")
}
function closeTab() {
TAB.close();
}
</script>
but its work change the elemnt of its own page, if use another URL its not work, and also its not vb. net XD
The following is functional code to modify a web page (any web page) using WatiN. You will be modifying the local copy you have locally, not the one on the server, of course. You can go as crazy as you want but you need to be more specific on what you want to achieve:
var browser = new IE();
browser.GoTo("about:blank");
browser.WaitForComplete();
browser.Eval(#"document.write('This is new text on the web page<br>')");
browser.Eval(#"var buttonnode= document.createElement('input');");
browser.Eval(#"buttonnode.setAttribute('type','button');");
browser.Eval(#"buttonnode.setAttribute('name','sal');");
browser.Eval(#"buttonnode.setAttribute('value','New Button');");
browser.Eval(#"document.body.appendChild(buttonnode);");
This morning my Chrome has been updated to version 44 and dojo editor widget I am using in my projects no longer works in some cases.
It seem to be working fine when used on a plain html page, but when using on modal window or inside an element with positioning the content of iframe becomes invisible due to zero width and being positioned at the left top corner of the browser.
Even dojo editor example in the documentation (http://dojotoolkit.org/reference-guide/1.10/dijit/Editor.html) does not work in Chrome 44.
Any help?
Edit: as a temporary workaround, we found this solution is working for us when loading the content of an editor into iframe:
this.iframe.style.display = "none";
setTimeout(dojo.hitch(this, function() {
this.iframe.style.display = "";
}), 100);