Questions tagged [webidl]

Web IDL is an interface definition language, that can be used to describe interfaces that are intended to be implemented in web browsers.

Web IDL is an interface definition language that can be used to describe interfaces that are intended to be implemented in web browsers. Web IDL is an IDL variant with a number of features that allow the behavior of common script objects in the web platform to be specified more readily.

26 questions
31
votes
10 answers

How to associate constants with an interface in C#?

Some languages let you associate a constant with an interface: A Java example A PhP example The W3C abstract interfaces do the same, for example: // Introduced in DOM Level 2: interface CSSValue { // UnitTypes const unsigned short …
ChrisW
  • 54,973
  • 13
  • 116
  • 224
29
votes
4 answers

Can WASM access the DOM without any JavaScript?

Is there any way to get read/write access to DOM and/or the WebAPIs(i.e. fullscreen API) without JavaScript? I'm trying to build a basic application in C(C source being actually the result of transpilation from a GC language). The app I'm building…
themihai
  • 7,903
  • 11
  • 39
  • 61
6
votes
1 answer

Why Mozilla has JavaScript documentation written with IDL

Reading documentation about fileReader, and find out that they write methods using void operator, like this: void readAsArrayBuffer ( in Blob blob ); just trying understand why they do write it like this? If there is any practical use of…
dmi3y
  • 3,482
  • 2
  • 21
  • 32
5
votes
1 answer

How to determine if a Javascript Number is in single-precision range?

According to the ECMAScript specification, Javascript number values correspond a to double-precision 64-bit binary format IEEE 754 value. For a WebIDL validator I'm currently working on, I need to be able to figure out if a given number value can be…
3
votes
0 answers

Is there a way to create WebIDL bindings for C++ templated types?

Let's say in C++ i have a function with the following signature: A getTemplatedClassInstance(); where A & B are some classes. I am then trying to generate WebIDl bindings for use in an emscripten build to use the C++ code from Javascript. I have…
dphil
  • 31
  • 3
3
votes
2 answers

WebKit/Phantomjs why output of getComputedStyles is that way?

on most browsers (e.g. Firefox, Opera) getting the computed Style for a element return a nice object of type CSSStyleDeclaration. On Chrome 28 and PhantomJS 1.9 I get an object that starts with numbered keys listing all the CSS properties, and then…
gcb
  • 13,901
  • 7
  • 67
  • 92
2
votes
0 answers

How can the global window object be created before there is a realm in existance?

Background When a browser opens a new window or tab, a new browsing context is created. As we can see from the HTML spec, the operation that creates a new browsing context calls another operation that creates a new realm, which in turn calls the…
Magnus
  • 6,791
  • 8
  • 53
  • 84
2
votes
0 answers

Rationales/consequences of WebIDL class inheritance requirements

In a JavaScript library (Node and browser) to which I am contributing (IndexedDBShim), for the sake of complete test coverage, I am hoping to ensure we can not only better pass general W3C tests pertaining to IndexedDB, but also the WebIDL-based…
Brett Zamir
  • 14,034
  • 6
  • 54
  • 77
2
votes
0 answers

How to install WebIDL Ubuntu

Hello I am trying to build a library using emscripten. I am encountering an error python /usr/share/emscripten/tools/webidl_binder.py liquidfun.idl liquidfun_glue Traceback (most recent call last): File…
xerotolerant
  • 1,955
  • 4
  • 21
  • 39
1
vote
1 answer

Why is Chrome placing two global objects on the prototype chain?

Background By reading the Web IDL spec section that relates to creating new platform objects, we know that when the global object is created its [[prototype]] is set to the global interface object's instance prototype object (which was created…
Magnus
  • 6,791
  • 8
  • 53
  • 84
1
vote
0 answers

What is actually platform object mean in html spec

Html spec defines several ways to define Realms in js code via these conceptions: Entry, Incumbent, Current, Relevant. The last one is specified by html spec in a special form: Every platform object has a relevant Realm, which is roughly the…
MaximPro
  • 563
  • 8
  • 21
1
vote
1 answer

Is there any methods to solve "unimplemented pure virtual method"

I'm using Emscripten to build my C++ source code to JavaScript, and I met some problem about how to write correct interface description in WebIDL file. C++ code example: class Base { public: virtual bool is_true() const = 0; virtual int…
OliverXH
  • 19
  • 3
1
vote
1 answer

Canonical, authoritive source of W3C WebIDLs

How do I find the the authoritative source of machine-readable Web IDL for a given W3C standard? For example, https://www.w3.org/TR/2018/REC-IndexedDB-2-20180130/ is the authoritative source of the Indexed Database 2.0 specification document. That…
Cactus
  • 27,075
  • 9
  • 69
  • 149
1
vote
0 answers

What's the different between WebID and IDL(XPIDL)?

WebIDL : Is the interface description language used to describe the data types, interfaces, methods, properties, and other components which make up a Web application programming interface (API). IDL(XPIDL) : It is an Interface Description Language…
KimmyYang
  • 111
  • 1
  • 4
1
vote
1 answer

How does XMLHttpRequest relate to the JS Window object

While reading up on XMLHttpRequest found out that it is a member of the high level JS global window object. For instance: if (window.XMLHttpRequest) { // Mozilla, Safari, IE7+ ... httpRequest = new XMLHttpRequest(); } else if…
Asim Mahar
  • 1,320
  • 1
  • 10
  • 13
1
2