I want to use indexedDB polyfill with Dart code compiled to Javascript. When i just added required script, dart2js code does not recognize window.indexedDB
property as IDBFactory instance and produce UnknownJavaScriptObject
interceptor.
I tried to force constructor.name on elements of polyfill, started with indexedDB
:
var shimIndexedDB = {
/**
* Force correct constructor name.
*/
constructor: function IDBFactory(){},
/**
* The IndexedDB Method to create a new database and return the DB
* @param {Object} name
* @param {Object} version
*/
open: function(name, version){
It was step forward, interceptor was correct. Unfortunately, when i added analogous construction to IDBOpenDBRequest, its object got IDBFactory interceptor as well.
How to correctly connect object and interceptor?