Questions tagged [global-object]

39 questions
1
vote
2 answers

How to use a dynamic property value in a jQuery widget

I have a javascript that returns a value whenever I choose an option from a dropdown menu. $(document).ready(function() { function calculateVals() { //dropdown menus var valuestart =…
CyberJunkie
  • 21,596
  • 59
  • 148
  • 215
0
votes
1 answer

Is it possible to create global objects in .NET MAUI

When I saw the TabBar and the Flyout menu in .NET Maui I started wondering if its possible to create your own global object for your application. does anyone know how to do this? (I want to add a status icon at the corner of my screen without having…
0
votes
1 answer

Flink shared object across jobs

I have a list of streaming jobs running in Flink, each job has different parallelisms. The jobs process documents. Now I want to make a snapshot of the document that each job last processed. I can use Redis to store the document ID and the Kafka…
boreas
  • 1,041
  • 1
  • 15
  • 30
0
votes
1 answer

Declare a Public Variant as constant

I am having trouble assigning a value to constant variant declaration. So the declaration is this Option Explicit public const Abc as variant = ? Abc is a Microfocus rumba object which gets initiated when the workbook is open, something like…
Samantha
  • 3
  • 1
0
votes
0 answers

Adding properties to global object in JS

why adding a property to globalThis inside a function doesn't work? let foo = function(){ this.name='Global Elite' } foo() console.log(this.name) // undefined This gets more confusing because if I use the arrow function instead the function…
0
votes
1 answer

Typescript global dictionary

I'm trying to write some darts games in Angular. And I want to have every field separated in my program, so I wrote something like this. export interface DartboardFieldsData{ name: string; value: number; shortcut: string; multiplier:…
Tasteless
  • 54
  • 1
  • 5
0
votes
2 answers

I'm having a hard time finding __proto__ of global object "window"

I'm currently working on Chrome. console.log(window.__proto__.__proto__.__proto__); console.log(window.__proto__.__proto__.__proto__ === EventTarget.prototype); I've found that first code above returns EventTarget.prototype This can be verified by…
kwonryul
  • 481
  • 3
  • 10
0
votes
0 answers

How can you ensure a global javascript object is updated and referenced properly?

I am developing a project wherein I require a global object to be instantiated with initial values, updated via an Angular Service, and then referenced again from within its native file with updated values. The ideal workflow would look something…
jstubb
  • 1
0
votes
2 answers

get undefined for data assigned in service in angular 6

I don't want to call the service in the .ts file. It will cause a lot of time. So I just want to assigned this as a global value that I can use, but I keep get undefined Here is my service file @Injectable({ providedIn: 'root' }) export class…
AshH
  • 39
  • 7
0
votes
3 answers

Is there any difference between var a = something and window.a = someting?

I'm new to the JavaScript World and I'm confused after I knew a lot about the global object (usually window) and knew it's just an object like any object I'd create and that var set properties in the global object unlike let after that Is there any…
0
votes
1 answer

Is global objects (e.g. Array) are part of Javascript programming Language?

I read the ECMAScript Doc and MDN Documents In browser or node environment, Javascript provides some global objects like Array and they have functions like filter and map. The question is: are these objects/functions part of the "Javascript…
0
votes
1 answer

How to pass/make an object/variable accessible inside a callback function which is called by a third party library?

How to make globalObject accessible by callbackFunction? I am using a third party library library.h which has a method libraryFunction. The output of libraryFunction is a libraryFunctionOutput which is passed into the callback function…
user1478046
0
votes
2 answers

who is the prototype object of global object/scope in javascript?

I tested this in Node shell: var a = {} a.__proto__ === Object.prototype // true global.__proto__ === Object.prototype // false global.__proto__.__proto__ === Object.prototype // true global.constructor.name //…
matianfu
  • 366
  • 2
  • 6
  • 15
0
votes
1 answer

Making created objects global [C++]

I'm programming a checkers game as a form of practice for object-oriented design. The error I'm getting is the following: First the code: #include #include using namespace std; class Piece { public: int ypos, xpos,…
user3258512
  • 323
  • 1
  • 3
  • 10
0
votes
4 answers

Can in this way be declared a global object class?

I do not know why but this code works, what does this record }r; and how it works ? can in this way be declared a global object class ? #include class А { public: А() { std::cout << "Hello World"; …
user1886376