Questions tagged [window.external]

12 questions
4
votes
1 answer

C# WebBrowser control: window.external access sub object

when assigning an object to the ObjectForScripting property of a WebBrowser control the methods of this object can be called by JavaScript by using windows.external.[method_name]. This works without problems. But how I need to design this C# object…
ab-tools
  • 528
  • 5
  • 18
3
votes
1 answer

window.external.notify passing data other than string

I am trying to write a windows phone app and I want to invoke a delegate when a user wants performs an action. But the problem is the action has to be performed in the webpage and the event has to be handled inside the app. I know this is not a…
Ajai
  • 3,440
  • 5
  • 28
  • 41
3
votes
2 answers

WebBrowser control: window.external access array

I'm trying to access an array from C# in Javascript. That's the JavaScript code: var testArray = window.external.testfunction(); for(var i = 0; i < testArray.length; i++) { alert(testArray[i]); } I tested it with following C# object assigned to…
ab-tools
  • 528
  • 5
  • 18
2
votes
0 answers

Blocked a frame with origin "file://" from accessing a cross-origin frame in Electron

So in an Electron App, I'm trying to open an URL and then access the window.external on it but I get the error: Blocked a frame with origin "file://" from accessing a cross-origin frame If I add the external.html inside the Electron app and make…
GhostDev
  • 21
  • 5
2
votes
1 answer

How can I check if function exists on window.external

How can I check if function exists on window.external? I'm calling C# code from javascript and I want to check if a method exists in the C# object.
e.s
  • 214
  • 3
  • 16
1
vote
1 answer

window.external not working in IE6 (Win XP SP3) from C# App

I've been using window.external in my c# windows application successfully to call a public function in my C# form. I've correctly set the objectforscripting property, and this works wonderfully on my development machine which has Windows 7 and…
Cyril Gupta
  • 13,505
  • 11
  • 64
  • 87
1
vote
1 answer

Correct Condition For Window.External.Notify is Defined

I'm developing hybrid application that require to call window.external.notify in javascript but this js code should run in browser also. So we have to have a condition for detecting is window.external.notify is defined or undefined. So we use that…
0
votes
1 answer

window.external works in WPF WebBrowser pointing to local Angular 8 website, but not when deployed

Forgive my formatting, as this is my first post. I have been working with a legacy app, and they added a new UI. This is just a POC to show we can make a thin client, and host our project online. I have a WPF window (.NET Framework 4.7.2), with a…
0
votes
1 answer

How to Call WPF c# method from .ts file using dotnetbrowser library

Here is ref i have given for Acccount class. i want to call c# method from .ts that is from angular along with i have to send data to method. mainLayout.Children.Add((UIElement)webView.GetComponent()); …
DeCOder
  • 1
  • 2
0
votes
1 answer

Rules to be followed to get window.external work

I found one thing in javascript of my WPF project. It has called window.external.ShowWindow(); I have found that method is written in class InteropClass like below. [ComVisible(true)] public class InteropClass { public void ShowWindow() { …
Imad
  • 7,126
  • 12
  • 55
  • 112
0
votes
1 answer

Provide a VB6 object for window.external in a WebBrowser-hosted page

With the .NET WebBrowser control we can do: WebBrowser1.ObjectForScripting = new a_class(); where a_class is declared as [ComVisible(True)]. After which the instance of a_class is accessible to the javascript in the page under the name of…
GSerg
  • 76,472
  • 17
  • 159
  • 346
0
votes
2 answers

window external null?

When i want to use window.external on internet explorer 9, it's always null. I want to use pinned methods but it cannot find the methods because of window external is null. if wonder that what is "pinned" you can check this…