| |
| /* |
| * weinre is available under *either* the terms of the modified BSD license *or* the |
| * MIT License (2008). See http://opensource.org/licenses/alphabetical for full text. |
| * |
| * Copyright (c) 2010, 2011 IBM Corporation |
| */ |
| |
| requireClass ./Ex |
| requireClass ./IDLTools |
| requireClass ./StackTrace |
| |
| //----------------------------------------------------------------------------- |
| class Weinre |
| throw new Ex(arguments, "this class is not intended to be instantiated") |
| |
| //----------------------------------------------------------------------------- |
| init |
| var _notImplemented = {} |
| var _showNotImplemented = false |
| var CSSProperties = [] |
| |
| //----------------------------------------------------------------------------- |
| static method addIDLs(idls) |
| IDLTools.addIDLs(idls) |
| |
| //----------------------------------------------------------------------------- |
| static method addCSSProperties(cssProperties) |
| CSSProperties = cssProperties |
| |
| //----------------------------------------------------------------------------- |
| static method getCSSProperties |
| return CSSProperties |
| |
| //----------------------------------------------------------------------------- |
| static method deprecated() |
| StackTrace.dump(arguments) |
| |
| //----------------------------------------------------------------------------- |
| static method notImplemented(thing) |
| if (_notImplemented[thing]) return |
| |
| _notImplemented[thing] = true |
| |
| if (!_showNotImplemented) return |
| console.log("weinre: " + thing + " not implemented") |
| |
| //----------------------------------------------------------------------------- |
| static method showNotImplemented() |
| _showNotImplemented = true |
| for (var key in _notImplemented) { |
| console.log("weinre: " + key + " not implemented") |
| } |