Commit 15792ce9 by Romain Courteaud

Release version 0.19.0

1 parent d0422855
......@@ -728,6 +728,19 @@ if (typeof document.contains !== 'function') {
Event, URL) {
"use strict";
/////////////////////////////////////////////////////////////////
// Error
/////////////////////////////////////////////////////////////////
function ScopeError(message) {
this.name = "scopeerror";
if ((message !== undefined) && (typeof message !== "string")) {
throw new TypeError('You must pass a string.');
}
this.message = message || "Scope Error";
}
ScopeError.prototype = new Error();
ScopeError.prototype.constructor = ScopeError;
function ensurePushableQueue(callback, argument_list, context) {
var result;
try {
......@@ -1848,13 +1861,15 @@ if (typeof document.contains !== 'function') {
.declareMethod('getDeclaredGadget',
function getDeclaredGadget(gadget_scope) {
if (!this.__sub_gadget_dict.hasOwnProperty(gadget_scope)) {
throw new Error("Gadget scope '" + gadget_scope + "' is not known.");
throw new ScopeError("Gadget scope '" + gadget_scope +
"' is not known.");
}
return this.__sub_gadget_dict[gadget_scope];
})
.declareMethod('dropGadget', function dropGadget(gadget_scope) {
if (!this.__sub_gadget_dict.hasOwnProperty(gadget_scope)) {
throw new Error("Gadget scope '" + gadget_scope + "' is not known.");
throw new ScopeError("Gadget scope '" + gadget_scope +
"' is not known.");
}
// http://perfectionkills.com/understanding-delete/
delete this.__sub_gadget_dict[gadget_scope];
......@@ -2171,6 +2186,7 @@ if (typeof document.contains !== 'function') {
// global
/////////////////////////////////////////////////////////////////
renderJS.Mutex = Mutex;
renderJS.ScopeError = ScopeError;
window.rJS = window.renderJS = renderJS;
window.__RenderJSGadget = RenderJSGadget;
window.__RenderJSEmbeddedGadget = RenderJSEmbeddedGadget;
......
{
"name": "renderjs",
"version": "0.18.0",
"version": "0.19.0",
"description": "RenderJs provides HTML5 gadgets",
"main": "dist/renderjs-latest.js",
"dependencies": {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!