Questions tagged [jsobject]

JSObject is a class of the Java UI library JavaFX. The class is used to manipulate Javascript objects from Java code.

JSObject is a class of the Java UI library JavaFX. The class is used to manipulate Javascript objects from Java code.

101 questions
2
votes
0 answers

JSObject dependent applet - Using applet viewer at development time

I am using Java Plug-in and JSObject for DOM/JS <-> Applet communication. I am using Eclipse IDE and at development time, I like the simplicity of Run/Debug As->Applet to launch and quickly see my layout/changes reflected in the running applet. But…
Amol Katdare
  • 6,740
  • 2
  • 33
  • 36
2
votes
3 answers

Updating objects of array in array with array of Object

I have a two javaScript Array let x = [ { id: 'Abc', children: [ { id: 12, name: 'john' }, { id: 13, name: 'dow' } ] …
2
votes
5 answers

Javascript: Is there a cleaner way to extract object properties?

I have the following JS code: let obj1 = { prop1: 1, prop2: 2, prop3: 3, prop4: 4 } let obj2 = { prop1: obj1.prop1, prop2: obj1.prop2, } Here I create obj2 which has certain select properties of obj1. Is there a…
gkeenley
  • 6,088
  • 8
  • 54
  • 129
2
votes
1 answer

Why does toJS() return an empty object when applied on observable object? - MobX

I am getting an empty object when I do toJS() on an observable object. I am assigning the values to the observableObject after an API call using Object.assign(). Now I am using this observableObject in a computed method of different store as shown…
uneet7
  • 2,925
  • 7
  • 24
  • 41
2
votes
0 answers

Why can't I access my JS Object Properties?

I'm trying to reformat JSON Data from a REST Api in order to display the data with d3. The d3 code is within an angular component, but I think the problem is more related to javascript. The template I want to use is here:…
JohnnyD.
  • 41
  • 3
2
votes
1 answer

Does JavaFX8 WebEngine's executeScript("window") method refer to the JavaScript window object?

I'm wondering about this code snippet I'm using: WebView webView = new WebView(); JSObject jsobj; webEngine = webView.getEngine(); try { webEngine.load(getClass().getResource("index.html").toExternalForm()); } catch (Exception e) { …
Peter
  • 1,844
  • 2
  • 31
  • 55
2
votes
2 answers

JSObject.getWindow(this); always throws an exception

I'm cutting my teeth on some Java/JavaScript coding and I seem to have hit a wall. I'm trying to pass agruments from Java to JavaScript but no matter what I do "JSObject jso = JSObject.getWindow(this);" always throws an exception. I've done some…
testingtester
  • 528
  • 4
  • 11
2
votes
0 answers

JavaFx JsObject cookie

I want to use jscript to set cookie inside my JavaFX application in browser . I tried to use JsObject for this purpose but it did not work properly and is throwing an exception: SECURITY_ERR: DOM Exception 18 This is the code I used: public static…
Fariz Aghayev
  • 649
  • 5
  • 17
2
votes
1 answer

Accessing object properties where the property name is in a variable

I am trying to check if a certain item exists in a JS object. To do this, I need to use whatever ID is passed into my method. At the moment I'm struggling to actually use the variable's value. Here's what I'm doing: data.entries.id So I have my…
Creights
  • 907
  • 1
  • 12
  • 25
1
vote
1 answer

get the closest class id attr of an object option

I am triggering an click event and it give me object as below Object { 0: option , length: 1 } ​ 0: ​ length: 1 ​ : Object { jquery: "3.5.1", constructor: S(e, t), length: 0, … } Below is my HTML code with select option. I want to get…
1
vote
1 answer

Invert boolean Values in JS object array

I'm dealing with object array var data = [ { "rdd": "Transducer Failure", "performance": true, "agc": true, "snr": true, "sos": true, "flowvel": true }, { "rdd": "Detection…
Abhinav
  • 1,202
  • 1
  • 8
  • 12
1
vote
2 answers

comparing two arrays and match one key from first array's object in the second array's object if found then insert a key and value

array1 = [ { _id: new ObjectId("639979460a52134240478a9b"), taggedFileId: '6399798f0a52134240478abf' }, { _id: new ObjectId("639b576c2743a77ea2812f07"), taggedFileId: '639988250a52134240478b07' } ] array2 = [ …
Tausif Anwar
  • 1,237
  • 1
  • 10
  • 21
1
vote
0 answers

Javascript bridge / upcall to JavaFX (via JSObject.setMember() method) breaks when moving class into a package

This is similar to this question, but I believe we are encountering different issues. Setup: I have a Kotlin class that interfaces with a TinyMCE instance running in a JavaFX Webview. I am setting up upcalls from Javascript to JavaFX as shown below,…
1
vote
1 answer

javascript : to update all element of in textbox when click on edit

I am new to working in javascript, I am work Dom element and create a demo of crud with the table. CRUDCODE: