Comments (3)
I think this is probably caused by the interface object being found in Chrome via navigator.geolocation.constructor
, and for example navigator.geolocation.constructor.prototype.clearWatch
can be found via that object.
In Firefox, navigator.geolocation.constructor == Object
. This is different from a similar case, navigator.permissions.constructor === Permissions
.
In other words, it looks like in Chrome, [NoInterfaceObject]
caused the interface object to not be exposed, where in Firefox there actually is no interface object, just the interface prototype object?
Starting from https://heycam.github.io/webidl/#NoInterfaceObject, I think step 12.3 of https://heycam.github.io/webidl/#interface-prototype-object is what accounts for Firefox's behavior, i.e. Firefox is correct.
Given that [NoInterfaceObject]
is going away I doubt any engine is going to change, but what would a good workaround in Confluence be?
It's a bit odd IMHO to pick up any interface object however it is found, and I think this also explains why Chrome is claimed to support SpeechRecognition#start even though SpeechRecognition
isn't exposed. webkitSpeechRecognition
is, and I'm guessing the same mechanism explains this as why Geolocation#clearWatch appears to be supported in Chrome.
from confluence.
#200 is related to this, but the usual manifestation of [NoInterfaceObject]
is that if we can't find an instance we just don't know about its support. For Geolocation
, an instance is easily found at navigator.geolocation
, but if we don't what kind of thing navigator.geolocation
is, nothing ends up in the API catalog.
from confluence.
I think this is probably caused by the interface object being found in Chrome via navigator.geolocation.constructor
Why not just find the proto (which is what you are really looking for here) via Object.getPrototypeOf(navigator.geolocation)
?
i.e. Firefox is correct.
Yep. Safari also gets this right. Is there a Chrome bindings bug tracking this?
Given that [NoInterfaceObject] is going away
It is? That is, is there a concrete plan for it to go away for non-mixins where it's used without causing webcompat issues?
what would a good workaround in Confluence be?
Use Object.getPrototypeOf
instead of looking at constructor
.
For the general case of [NoInterfaceObject]
and no instance, I agree that it's hard to do anything sane...
from confluence.
Related Issues (20)
- Unit tests are broken HOT 9
- Deploy with Edge 12 data HOT 4
- Add BrowserStack logo HOT 1
- App shows items on AudioWorkletNode interface in wrong version.
- Console has no data newer than November 2018 HOT 3
- Use BCD's release dates
- Duplicate releases of "same" version affects metrics
- Incomplete methods list of WebRTC HOT 3
- Firefox data is outdated HOT 10
- getBoxQuads is missing from the data HOT 2
- UI for "browser-specific" API list is pretty much unusable HOT 2
- Include Firefox 71 data
- Vendor bundle has grown over time to >1.5MB HOT 1
- No data after October 2019? HOT 9
- Allow linking directly to sub top-level pages
- Showing multiple Blink-based browsers makes metrics nonsense HOT 8
- The README file in this repo has a bad link - [404:NotFound] HOT 1
- Spam
- Add gridlines to graphs for easier counting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from confluence.