Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dojo

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dojo - npm Package Compare versions

Comparing version 1.10.4 to 1.10.5

lcov.info

4

_base/config.js

@@ -188,4 +188,4 @@ define(["../has", "require"], function(has, require){

if(!result.locale && typeof navigator != "undefined"){
// Default locale for browsers.
var language = (navigator.language || navigator.userLanguage);
// Default locale for browsers (ensure it's read from user-settings not download locale).
var language = navigator.languages ? navigator.languages[0] : (navigator.language || navigator.userLanguage);
if(language){

@@ -192,0 +192,0 @@ result.locale = language.toLowerCase();

@@ -83,3 +83,3 @@ define(["../has", "./config", "require", "module"], function(has, config, require, module){

var rev = "$Rev: f4fef70 $".match(/[0-9a-f]{7,}/);
var rev = "$Rev: 68886c4 $".match(/[0-9a-f]{7,}/);
dojo.version = {

@@ -97,3 +97,3 @@ // summary:

major: 1, minor: 10, patch: 4, flag: "",
major: 1, minor: 10, patch: 5, flag: "",
revision: rev ? rev[0] : NaN,

@@ -151,8 +151,14 @@ toString: function(){

has.add("dojo-guarantee-console",
// ensure that console.log, console.warn, etc. are defined
1
);
if(!has("host-webworker")){
// console is immutable in FF30+, https://bugs.dojotoolkit.org/ticket/18100
has.add("dojo-guarantee-console",
// ensure that console.log, console.warn, etc. are defined
1
);
}
if(has("dojo-guarantee-console")){
typeof console != "undefined" || (console = {});
// IE 9 bug: https://bugs.dojotoolkit.org/ticket/18197
has.add("console-as-object", Function.prototype.bind && console && typeof console.log === "object");
typeof console != "undefined" || (console = {}); // intentional assignment
// Be careful to leave 'log' always at the end

@@ -177,2 +183,4 @@ var cn = [

})();
}else if(has("console-as-object")){
console[tn] = Function.prototype.bind.call(console[tn], console);
}

@@ -179,0 +187,0 @@ }

@@ -219,3 +219,3 @@ define(["./kernel", "../has", "../sniff"], function(dojo, has){

// 'dojo.global'. Null may be passed.
return getProp(name ? name.split(".") : [], create, context); // Object
return !name ? context : getProp(name.split("."), create, context); // Object
},

@@ -222,0 +222,0 @@

@@ -67,12 +67,4 @@ define([

if(
has("ff") || // Firefox has Firebug
has("chrome") || // Chrome 3+ has a console
has("safari") || // Safari 4 has a console
isNewIE || // Has the new IE console
window.firebug || // Testing for mozilla firebug lite
(typeof console != "undefined" && console.firebug) || //The firebug console
dojo.config.useCustomLogger || // Allow custom loggers
has("air") // isDebug triggers AIRInsector, not Firebug
){
// All browsers we support have built in consoles, but leaving firebug lite for IE6 and IE7.
if(!(has("ie") < 8)){
return;

@@ -79,0 +71,0 @@ }

@@ -7,3 +7,3 @@ define([], function(){

"use strict";
var undefined, nextId = 0;
var undefined;
function advise(dispatcher, type, advice, receiveArguments){

@@ -53,3 +53,3 @@ var previous = dispatcher[type];

},
id: nextId++,
id: dispatcher.nextId++,
advice: advice,

@@ -84,3 +84,3 @@ receiveArguments: receiveArguments

target[methodName] = dispatcher = function(){
var executionId = nextId;
var executionId = dispatcher.nextId;
// before advice

@@ -90,3 +90,5 @@ var args = arguments;

while(before){
args = before.advice.apply(this, args) || args;
if(before.advice){
args = before.advice.apply(this, args) || args;
}
before = before.next;

@@ -101,8 +103,10 @@ }

while(after && after.id < executionId){
if(after.receiveArguments){
var newResults = after.advice.apply(this, args);
// change the return value only if a new value was returned
results = newResults === undefined ? results : newResults;
}else{
results = after.advice.call(this, results, args);
if(after.advice){
if(after.receiveArguments){
var newResults = after.advice.apply(this, args);
// change the return value only if a new value was returned
results = newResults === undefined ? results : newResults;
}else{
results = after.advice.call(this, results, args);
}
}

@@ -119,2 +123,3 @@ after = after.next;

dispatcher.target = target;
dispatcher.nextId = dispatcher.nextId || 0;
}

@@ -121,0 +126,0 @@ var results = advise((dispatcher || existing), type, advice, receiveArguments);

@@ -25,3 +25,3 @@ define(["../_base/kernel", "../_base/lang"], function(dojo, lang){

LAK:0,LBP:0,LUF:0,LYD:3,MGA:0,MGF:0,MMK:0,MNT:0,MRO:0,
MUR:0,OMR:3,PKR:0,PYG:0,RSD:0,RWF:0,SLL:0,SOS:0,STD:0,
MUR:0,OMR:3,PKR:2,PYG:0,RSD:0,RWF:0,SLL:0,SOS:0,STD:0,
SYP:0,TMM:0,TND:3,TRL:0,TZS:0,UGX:0,UZS:0,VND:0,VUV:0,

@@ -28,0 +28,0 @@ XAF:0,XOF:0,XPF:0,YER:0,ZMK:0,ZWD:0

@@ -61,3 +61,3 @@ _Do you have a contribution? We welcome contributions, but please ensure that you read the following information

When logged in to your GitHub account, and you are viewing one of the main repositories, you will see the *Fork* button.
Clicking this button will show you which repositories your can fork to. Choose your own account. Once the process
Clicking this button will show you which organizations your can fork to. Choose your own account. Once the process
finishes, you will have your own repository that is "forked" from the official one.

@@ -64,0 +64,0 @@

@@ -605,2 +605,3 @@ define([

var _customFormats = [];
var _cachedGregorianBundles = {};
exports.addCustomFormats = function(/*String*/ packageName, /*String*/ bundleName){

@@ -619,5 +620,9 @@ // summary:

_customFormats.push({pkg:packageName,name:bundleName});
_cachedGregorianBundles = {};
};
exports._getGregorianBundle = function(/*String*/ locale){
if(_cachedGregorianBundles[locale]){
return _cachedGregorianBundles[locale];
}
var gregorian = {};

@@ -628,3 +633,3 @@ array.forEach(_customFormats, function(desc){

}, this);
return gregorian; /*Object*/
return _cachedGregorianBundles[locale] = gregorian; /*Object*/
};

@@ -631,0 +636,0 @@

@@ -120,3 +120,3 @@ define(["./_base/lang", "./_base/array", "./dom"], function(lang, array, dom){

// Do something if a node with id="someNode" has class="aSillyClassName" present
// | if(dojo.hasClass("someNode","aSillyClassName")){ ... }
// | if(domClass.contains("someNode","aSillyClassName")){ ... }

@@ -239,3 +239,3 @@ return ((" " + dom.byId(node)[className] + " ").indexOf(" " + classStr + " ") >= 0); // Boolean

// Replaces one or more classes on a node if not present.
// Operates more quickly than calling dojo.removeClass and dojo.addClass
// Operates more quickly than calling domClass.remove and domClass.add
//

@@ -294,3 +294,3 @@ // node: String|DOMNode

// If passed, true means to add the class, false means to remove.
// Otherwise dojo.hasClass(node, classStr) is used to detect the class presence.
// Otherwise domClass.contains(node, classStr) is used to detect the class presence.
//

@@ -297,0 +297,0 @@ // example:

@@ -434,46 +434,44 @@ define(["./sniff", "./_base/window","./dom", "./dom-style"],

if(has("ie")){
geom.getIeDocumentElementOffset = function getIeDocumentElementOffset(/*Document?*/ doc){
// summary:
// returns the offset in x and y from the document body to the
// visual edge of the page for IE
// doc: Document?
// Optional document to query. If unspecified, use win.doc.
// description:
// The following values in IE contain an offset:
// | event.clientX
// | event.clientY
// | node.getBoundingClientRect().left
// | node.getBoundingClientRect().top
// But other position related values do not contain this offset,
// such as node.offsetLeft, node.offsetTop, node.style.left and
// node.style.top. The offset is always (2, 2) in LTR direction.
// When the body is in RTL direction, the offset counts the width
// of left scroll bar's width. This function computes the actual
// offset.
geom.getIeDocumentElementOffset = function getIeDocumentElementOffset(/*Document?*/ doc){
// summary:
// returns the offset in x and y from the document body to the
// visual edge of the page for IE
// doc: Document?
// Optional document to query. If unspecified, use win.doc.
// description:
// The following values in IE contain an offset:
// | event.clientX
// | event.clientY
// | node.getBoundingClientRect().left
// | node.getBoundingClientRect().top
// But other position related values do not contain this offset,
// such as node.offsetLeft, node.offsetTop, node.style.left and
// node.style.top. The offset is always (2, 2) in LTR direction.
// When the body is in RTL direction, the offset counts the width
// of left scroll bar's width. This function computes the actual
// offset.
//NOTE: assumes we're being called in an IE browser
//NOTE: assumes we're being called in an IE browser
doc = doc || win.doc;
var de = doc.documentElement; // only deal with HTML element here, position() handles body/quirks
doc = doc || win.doc;
var de = doc.documentElement; // only deal with HTML element here, position() handles body/quirks
if(has("ie") < 8){
var r = de.getBoundingClientRect(), // works well for IE6+
l = r.left, t = r.top;
if(has("ie") < 7){
l += de.clientLeft; // scrollbar size in strict/RTL, or,
t += de.clientTop; // HTML border size in strict
}
return {
x: l < 0 ? 0 : l, // FRAME element border size can lead to inaccurate negative values
y: t < 0 ? 0 : t
};
}else{
return {
x: 0,
y: 0
};
if(has("ie") < 8){
var r = de.getBoundingClientRect(), // works well for IE6+
l = r.left, t = r.top;
if(has("ie") < 7){
l += de.clientLeft; // scrollbar size in strict/RTL, or,
t += de.clientTop; // HTML border size in strict
}
};
}
return {
x: l < 0 ? 0 : l, // FRAME element border size can lead to inaccurate negative values
y: t < 0 ? 0 : t
};
}else{
return {
x: 0,
y: 0
};
}
};

@@ -480,0 +478,0 @@ geom.fixIeBiDiScrollLeft = function fixIeBiDiScrollLeft(/*Integer*/ scrollLeft, /*Document?*/ doc){

@@ -202,15 +202,16 @@ define(["./sniff", "./dom"], function(has, dom){

type = type.toLowerCase();
if(has("ie") || has("trident")){
if(value == "auto"){
if(type == "height"){ return node.offsetHeight; }
if(type == "width"){ return node.offsetWidth; }
// Adjustments for IE and Edge
if(value == "auto"){
if(type == "height"){ return node.offsetHeight; }
if(type == "width"){ return node.offsetWidth; }
}
if(type == "fontweight"){
switch(value){
case 700: return "bold";
case 400:
default: return "normal";
}
if(type == "fontweight"){
switch(value){
case 700: return "bold";
case 400:
default: return "normal";
}
}
}
if(!(type in _pixelNamesCache)){

@@ -217,0 +218,0 @@ _pixelNamesCache[type] = _pixelRegExp.test(type);

@@ -47,4 +47,10 @@ define([

arrayUtil.forEach(this._animations, function(a){
this.duration += a.duration;
if(a.delay){ this.duration += a.delay; }
if(a){
if(typeof a.duration != "undefined"){
this.duration += a.duration;
}
if(a.delay){
this.duration += a.delay;
}
}
}, this);

@@ -51,0 +57,0 @@ };

@@ -112,5 +112,9 @@ define(["require", "module"], function(require, module){

// Pointer Events support
has.add("pointer-events", "onpointerdown" in document);
has.add("MSPointer", "msMaxTouchPoints" in navigator); //IE10 (+IE11 preview)
// Test if pointer events are supported and enabled, with either standard names ("pointerdown" etc.) or
// IE specific names ("MSPointerDown" etc.). Tests are designed to work on embedded C# WebBrowser Controls
// in addition to IE, Edge, and future versions of Firefox and Chrome.
// Note that on IE11, has("pointer-events") and has("MSPointer") are both true.
has.add("pointer-events", "pointerEnabled" in window.navigator ?
window.navigator.pointerEnabled : "PointerEvent" in window);
has.add("MSPointer", window.navigator.msPointerEnabled);

@@ -117,0 +121,0 @@ // I don't know if any of these tests are really correct, just a rough guess

@@ -381,3 +381,3 @@ define(["./_base/kernel", "require", "./has", "./_base/array", "./_base/config", "./_base/lang", "./has!host-browser?./_base/xhr", "./json", "module"],

// backcompat
bundle._localized = bundle._localized || {};
if(!bundle._localized){continue;}

@@ -427,3 +427,6 @@ var localized;

contextRequire(requiredBundles, function(){
for(var i = 0; i < requiredBundles.length; i++){
// requiredBundles was constructed by forEachLocale so it contains locales from
// less specific to most specific.
// the loop starts with the most specific locale, the last one.
for(var i = requiredBundles.length - 1; i >= 0 ; i--){
bundle = lang.mixin(lang.clone(bundle), arguments[i]);

@@ -537,9 +540,11 @@ cache[cacheIds[i]] = bundle;

var bundle = require.syncLoadNls(mid);
// don't need to check for legacy since syncLoadNls returns a module if the module
// (1) was already loaded, or (2) was in the cache. In case 1, if syncRequire is called
// from getLocalization --> load, then load will have called checkForLegacyModules() before
// calling syncRequire; if syncRequire is called from preloadLocalizations, then we
// don't care about checkForLegacyModules() because that will be done when a particular
// bundle is actually demanded. In case 2, checkForLegacyModules() is never relevant
// because cached modules are always v1.7+ built modules.
// need to check for legacy module here because there might be a legacy module for a
// less specific locale (which was not looked up during the first checkForLegacyModules
// call in load()).
// Also need to reverse the locale and the module name in the mid because syncRequire
// deps parameters uses the AMD style package/nls/locale/module while legacy code uses
// package/nls/module/locale.
if(!bundle){
bundle = checkForLegacyModules(mid.replace(/nls\/([^\/]*)\/([^\/]*)$/, "nls/$2/$1"));
}
if(bundle){

@@ -546,0 +551,0 @@ results.push(bundle);

@@ -160,2 +160,5 @@ define({ root:

,
"bs": true,
"mk": true,
"sr": true,
"zh": true,

@@ -186,2 +189,3 @@ "zh-tw": true,

"fi": true,
"eu": true,
"es": true,

@@ -188,0 +192,0 @@ "el": true,

@@ -89,5 +89,10 @@ define([/*===== "./_base/declare", =====*/ "./_base/lang", "./i18n", "./i18n!./cldr/nls/number", "./string", "./regexp"],

decimal = options.customs.currencyDecimal || decimal;// Should these be mixins instead?
pattern = pattern.replace(/\u00a4{1,3}/, function(match){
var prop = ["symbol", "currency", "displayName"][match.length-1];
return options[prop] || options.currency || "";
pattern = pattern.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/, function(match, before, target, after){
var prop = ["symbol", "currency", "displayName"][target.length-1],
symbol = options[prop] || options.currency || "";
// if there is no symbol, also remove surrounding whitespaces
if(!symbol){
return "";
}
return before+symbol+after;
});

@@ -354,2 +359,8 @@ }else if(pattern.indexOf('E') != -1){

symbol = dregexp.escapeString(options[prop] || options.currency || "");
// if there is no symbol there is no need to take white-spaces into account.
if(!symbol){
return "";
}
before = before ? "[\\s\\xa0]" : "";

@@ -356,0 +367,0 @@ after = after ? "[\\s\\xa0]" : "";

@@ -12,3 +12,3 @@ define(["./has!dom-addeventlistener?:./aspect", "./_base/kernel", "./sniff"], function(aspect, dojo, has){

});
if(has("touch")){

@@ -71,5 +71,5 @@ has.add("touch-can-modify-event-delegate", function(){

if(typeof target.on == "function" && typeof type != "function" && !target.nodeType){
// delegate to the target's on() method, so it can handle it's own listening if it wants (unless it
// delegate to the target's on() method, so it can handle it's own listening if it wants (unless it
// is DOM node and we may be dealing with jQuery or Prototype's incompatible addition to the
// Element prototype
// Element prototype
return target.on(type, listener);

@@ -102,3 +102,3 @@ }

// summary:
// This function acts the same as on(), but will only call the listener once. The
// This function acts the same as on(), but will only call the listener once. The
// listener will be called for the first

@@ -115,2 +115,3 @@ // event that takes place and then listener will automatically be removed.

on.parse = function(target, type, listener, addListener, dontFix, matchesTarget){
var events;
if(type.call){

@@ -127,4 +128,4 @@ // event handler function

// we allow comma delimited event names, so you can register for multiple events at once
var events = type.split(/\s*,\s*/);
}
events = type.split(/\s*,\s*/);
}
if(events){

@@ -134,3 +135,3 @@ var handles = [];

var eventName;
while(eventName = events[i++]){
while(eventName = events[i++]){ // intentional assignment
handles.push(on.parse(target, eventName, listener, addListener, dontFix, matchesTarget));

@@ -165,8 +166,8 @@ }

if(!has("event-orientationchange") && (type == "orientationchange")){
//"orientationchange" not supported <= Android 2.1,
//"orientationchange" not supported <= Android 2.1,
//but works through "resize" on window
type = "resize";
type = "resize";
target = window;
listener = fixTouchListener(listener);
}
}
}

@@ -219,3 +220,3 @@ if(addStopImmediate){

// see if we have a valid matchesTarget or default to dojo/query
matchesTarget = matchesTarget && matchesTarget.matches ? matchesTarget : dojo.query;
matchesTarget = matchesTarget && (typeof matchesTarget.matches == "function") ? matchesTarget : dojo.query;
children = children !== false;

@@ -233,3 +234,3 @@ // there is a selector, so make sure it matches

return node;
}
};
on.selector = function(selector, eventType, children){

@@ -247,3 +248,3 @@ // summary:

// children:
// Indicates if children elements of the selector should be allowed. This defaults to
// Indicates if children elements of the selector should be allowed. This defaults to
// true

@@ -288,10 +289,10 @@ // example:

// target:
// The target object to fire the event on. This can be a DOM element or a plain
// The target object to fire the event on. This can be a DOM element or a plain
// JS object. If the target is a DOM element, native event emitting mechanisms
// are used when possible.
// type:
// The event type name. You can emulate standard native events like "click" and
// The event type name. You can emulate standard native events like "click" and
// "mouseover" or create custom events like "open" or "finish".
// event:
// An object that provides the properties for the event. See https://developer.mozilla.org/en/DOM/event.initEvent
// An object that provides the properties for the event. See https://developer.mozilla.org/en/DOM/event.initEvent
// for some of the properties. These properties are copied to the event object.

@@ -304,3 +305,3 @@ // Of particular importance are the cancelable and bubbles properties. The

// on the target and then each parent successively until the top of the tree
// is reached or stopPropagation() is called. Both bubbles and cancelable
// is reached or stopPropagation() is called. Both bubbles and cancelable
// default to false.

@@ -371,4 +372,4 @@ // returns:

};
}
}
};
}
if(has("dom-addeventlistener")){

@@ -379,6 +380,6 @@ // emitter that works with native event handling

// use the native event emitting mechanism if it is available on the target object
// create a generic event
// we could create branch into the different types of event constructors, but
// that would be a lot of extra code, with little benefit that I can see, seems
// best to use the generic constructor and copy properties over, making it
// create a generic event
// we could create branch into the different types of event constructors, but
// that would be a lot of extra code, with little benefit that I can see, seems
// best to use the generic constructor and copy properties over, making it
// easy to have events look like the ones created with specific initializers

@@ -482,4 +483,4 @@ var ownerDocument = target.ownerDocument || document;

listener = fixListener(listener);
if(((target.ownerDocument ? target.ownerDocument.parentWindow : target.parentWindow || target.window || window) != top ||
has("jscript") < 5.8) &&
if(((target.ownerDocument ? target.ownerDocument.parentWindow : target.parentWindow || target.window || window) != top ||
has("jscript") < 5.8) &&
!has("config-_allow_leaks")){

@@ -538,9 +539,9 @@ // IE will leak memory on certain handlers in frames (IE8 and earlier) and in unattached DOM nodes for JScript 5.7 and below.

}
if(has("touch")){
if(has("touch")){
var EventDelegate = function(){};
var windowOrientation = window.orientation;
var fixTouchListener = function(listener){
return function(originalEvent){
//Event normalization(for ontouchxxx and resize):
//1.incorrect e.pageX|pageY in iOS
var windowOrientation = window.orientation;
var fixTouchListener = function(listener){
return function(originalEvent){
//Event normalization(for ontouchxxx and resize):
//1.incorrect e.pageX|pageY in iOS
//2.there are no "e.rotation", "e.scale" and "onorientationchange" in Android

@@ -555,3 +556,3 @@ //3.More TBD e.g. force | screenX | screenX | clientX | clientY | radiusX | radiusY

delete originalEvent.type; // on some JS engines (android), deleting properties makes them mutable
}catch(e){}
}catch(e){}
if(originalEvent.type){

@@ -586,7 +587,7 @@ // Deleting the property of the original event did not work (this is the case of

if(type == 'resize'){
if(windowOrientation == window.orientation){
if(windowOrientation == window.orientation){
return null;//double tap causes an unexpected 'resize' in Android
}
}
windowOrientation = window.orientation;
event.type = "orientationchange";
event.type = "orientationchange";
return listener.call(this, event);

@@ -596,3 +597,3 @@ }

if(!("rotation" in event)){ // test to see if it has rotation
event.rotation = 0;
event.rotation = 0;
event.scale = 1;

@@ -607,7 +608,7 @@ }

}
return listener.call(this, event);
};
};
return listener.call(this, event);
};
};
}
return on;
});

@@ -1,2 +0,2 @@

define(['../on', '../_base/window', '../dom-construct', '../domReady!'], function(on, baseWin, domConstruct){
define(['../on', '../has', '../_base/window', 'dojo/has!host-browser?../dom-construct', 'dojo/has!host-browser?../domReady!'], function(on, has, baseWin, domConstruct){
// summary:

@@ -11,16 +11,20 @@ // This sub module provide an event factory for delayed events (like debounce or throttle)

//will trigger a JS error (invalid member)
var testNode = domConstruct.create('div', null, baseWin.body()),
var testNode,
testEvent,
requiresClone;
on.once(testNode, 'click', function(e){
testEvent = e;
});
testNode.click();
try{
requiresClone = testEvent.clientX === undefined;
}catch(e){
requiresClone = true;
}finally{
domConstruct.destroy(testNode);
requiresClone = false;
if(domConstruct) {
testNode = domConstruct.create('input', {type: 'button'}, baseWin.body()),
on.once(testNode, 'click', function(e){
testEvent = e;
});
testNode.click();
try{
requiresClone = testEvent.clientX === undefined;
}catch(e){
requiresClone = true;
}finally{
domConstruct.destroy(testNode);
}
}
has.add('native-async-event-support', !requiresClone);

@@ -27,0 +31,0 @@ function clone(arg){

{
"name": "dojo",
"version":"1.10.4",
"version":"1.10.5",
"directories": {

@@ -9,16 +9,11 @@ "lib": "."

"description": "Dojo core is a powerful, lightweight library that makes common tasks quicker and easier. Animate elements, manipulate the DOM, and query with easy CSS syntax, all without sacrificing performance.",
"licenses": [
{
"type": "AFLv2.1",
"url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43"
},
{
"type": "BSD",
"url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13"
}
],
"license" : "BSD-3-Clause OR AFL-2.1",
"bugs": "http://bugs.dojotoolkit.org/",
"keywords": ["JavaScript", "Dojo", "Toolkit"],
"homepage": "http://dojotoolkit.org/",
"repository":{
"type": "git",
"url": "https://github.com/dojo/dojo.git"
},
"dojoBuild": "dojo.profile.js"
}

@@ -23,3 +23,3 @@ # dojo

The Dojo Toolkit (including this package) is dual licensed under BSD 3-Clause and AFL. For more information on the
license please see the [License Information][]. The Dojo Toolkit is Copyright (c) 2005-2013, The Dojo Foundation. All
license please see the [License Information][]. The Dojo Toolkit is Copyright (c) 2005-2016, The Dojo Foundation. All
rights reserved.

@@ -32,2 +32,2 @@

[Community Forum]: http://dojotoolkit.org/community/
[License Information]: http://dojotoolkit.org/license
[License Information]: http://dojotoolkit.org/license

@@ -307,3 +307,3 @@ define([

query('a', doc.documentElement).orphan();
var xmlText = doc.documentElement.innerText;
var xmlText = doc.documentElement.innerText || doc.documentElement.textContent;
xmlText = xmlText.replace(/>\s+</g, '><');

@@ -310,0 +310,0 @@ response.text = lang.trim(xmlText);

@@ -46,3 +46,3 @@ define([

function dataHandler (response) {
return response.data || response.text;
return response.data !== undefined ? response.data : response.text;
}

@@ -49,0 +49,0 @@

@@ -15,7 +15,7 @@ define([

has.add('dojo-force-activex-xhr', function(){
return has('activex') && !document.addEventListener && window.location.protocol === 'file:';
return has('activex') && window.location.protocol === 'file:';
});
has.add('native-xhr2', function(){
if(!has('native-xhr')){ return; }
if(!has('native-xhr') || has('dojo-force-activex-xhr')){ return; }
var x = new XMLHttpRequest();

@@ -119,3 +119,3 @@ return typeof x['addEventListener'] !== 'undefined' &&

} else if(response.xhr.readyState === 3){
response.loaded = evt.position;
response.loaded = ('loaded' in evt) ? evt.loaded : evt.position;
dfd.progress(response);

@@ -122,0 +122,0 @@ }

@@ -501,3 +501,9 @@ define([

// here to avoid negation in the fast path.
var _noNES = (typeof getDoc().firstChild.nextElementSibling == "undefined");
// NOTE: Firefox versions 25-27 implemented an incompatible change
// to the spec, https://bugzilla.mozilla.org/show_bug.cgi?id=932501
// and https://www.w3.org/Bugs/Public/show_bug.cgi?id=23691 ,
// where nextElementSibling was implemented on the DocumentType
var htmlElement = getDoc().documentElement;
var _noNES = !(htmlElement.nextElementSibling ||
"nextElementSibling" in htmlElement);
var _ns = !_noNES ? "nextElementSibling" : "nextSibling";

@@ -1121,3 +1127,3 @@ var _ps = !_noNES ? "previousElementSibling" : "previousSibling";

};
//Don't apply the infixSpaceRe to attribute value selectors

@@ -1416,3 +1422,3 @@ var attRe = /([^[]*)([^\]]*])?/g;

// | });
// these elements will match:

@@ -1439,3 +1445,3 @@ // | <span class="foo bar"></span>

// affecting any nested tables:
// | require(["dojo/query"], function(query) {
// | require(["dojo/query"], function(query) {
// | query("#tabular_data > tbody > tr:nth-child(odd)").addClass("odd");

@@ -1442,0 +1448,0 @@ // | );

@@ -18,12 +18,23 @@ define(["./has"], function(has){

tv = parseFloat(dav);
has.add("air", dua.indexOf("AdobeAIR") >= 0);
has.add("wp", parseFloat(dua.split("Windows Phone")[1]) || undefined);
has.add("msapp", parseFloat(dua.split("MSAppHost/")[1]) || undefined);
has.add("khtml", dav.indexOf("Konqueror") >= 0 ? tv : undefined);
has.add("webkit", parseFloat(dua.split("WebKit/")[1]) || undefined);
has.add("chrome", parseFloat(dua.split("Chrome/")[1]) || undefined);
has.add("safari", dav.indexOf("Safari")>=0 && !has("chrome") ? parseFloat(dav.split("Version/")[1]) : undefined);
has.add("edge", parseFloat(dua.split("Edge/")[1]) || undefined);
has.add("opr", parseFloat(dua.split("OPR/")[1]) || undefined);
// NOTE: https://dev.opera.com/blog/opera-user-agent-strings-opera-15-and-beyond/
has.add("webkit", !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18540
&& !has("edge") && parseFloat(dua.split("WebKit/")[1]) || undefined);
has.add("chrome", !has("edge") && !has("opr")
&& parseFloat(dua.split("Chrome/")[1]) || undefined);
has.add("android", !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18528
&& parseFloat(dua.split("Android ")[1]) || undefined);
has.add("safari", dav.indexOf("Safari") >= 0
&& !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18540
&& !has("chrome") && !has("android") && !has("edge") && !has("opr") ?
parseFloat(dav.split("Version/")[1]) : undefined);
has.add("mac", dav.indexOf("Macintosh") >= 0);
has.add("quirks", document.compatMode == "BackCompat");
if(dua.match(/(iPhone|iPod|iPad)/)){
if(!has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1, see #18528
&& dua.match(/(iPhone|iPod|iPad)/)){
var p = RegExp.$1.replace(/P/, "p");

@@ -35,3 +46,2 @@ var v = dua.match(/OS ([\d_]+)/) ? RegExp.$1 : "1";

}
has.add("android", parseFloat(dua.split("Android ")[1]) || undefined);
has.add("bb", (dua.indexOf("BlackBerry") >= 0 || dua.indexOf("BB10") >= 0) && parseFloat(dua.split("Version/")[1]) || undefined);

@@ -51,3 +61,4 @@ has.add("trident", parseFloat(dav.split("Trident/")[1]) || undefined);

// Mozilla and firefox
if(dua.indexOf("Gecko") >= 0 && !has("khtml") && !has("webkit") && !has("trident")){
if(dua.indexOf("Gecko") >= 0 && !has("wp") // NOTE: necessary since Windows Phone 8.1 Update 1
&& !has("khtml") && !has("trident") && !has("edge")){
has.add("mozilla", tv);

@@ -54,0 +65,0 @@ }

@@ -173,3 +173,3 @@ define(["../../_base/declare"], function(declare){

// For example:
// | [{attribute:"price, descending: true}].
// | [{attribute:"price", descending: true}].
// If the sort parameter is omitted, then the natural order of the store may be

@@ -176,0 +176,0 @@ // applied if there is a natural order.

@@ -26,12 +26,12 @@ define([

lang.mixin(this, options);
if(!"idProperty" in options){
var idAttribute;
if(!("idProperty" in options)){
var idAttribute;
try{
idAttribute = this.store.getIdentityAttributes();
}catch(e){
// some store are not requiring an item instance to give us the ID attributes
// but some other do and throw errors in that case.
}
// if no idAttribute we have implicit id
this.idProperty = (!idAttribute || !idAttributes[0]) || this.idProperty;
idAttribute = this.store.getIdentityAttributes();
}catch(e){
// some store are not requiring an item instance to give us the ID attributes
// but some other do and throw errors in that case.
}
// if no idAttribute we have implicit id
this.idProperty = (lang.isArray(idAttribute) ? idAttribute[0] : idAttribute) || this.idProperty;
}

@@ -59,3 +59,3 @@ var features = this.store.getFeatures();

queryEngine: SimpleQueryEngine,
_objectConverter: function(callback){

@@ -134,6 +134,6 @@ var store = this.store;

if(typeof id == "undefined"){
store.newItem(object);
var item = store.newItem(object);
store.save({
onComplete: function(){
deferred.resolve(object);
deferred.resolve(item);
},

@@ -163,7 +163,7 @@ onError: function(error){

}
store.newItem(object);
var item = store.newItem(object);
}
store.save({
onComplete: function(){
deferred.resolve(object);
deferred.resolve(item);
},

@@ -170,0 +170,0 @@ onError: function(error){

@@ -64,3 +64,3 @@ define(["../_base/xhr", "../_base/lang", "../json", "../_base/declare", "./util/QueryResults" /*=====, "./api/Store" =====*/

descendingPrefix: "-",
_getTarget: function(id){

@@ -73,3 +73,3 @@ // summary:

if(typeof id != "undefined"){
if(target.charAt(target.length-1) == '/'){
if((target.charAt(target.length-1) == '/') || (target.charAt(target.length-1) == '=')){
target += id;

@@ -82,3 +82,3 @@ }else{

},
get: function(id, options){

@@ -229,2 +229,2 @@ // summary:

});
});

@@ -74,5 +74,10 @@ define(["../_base/kernel", "../_base/lang", "../when", "../_base/array" /*=====, "./api/Store" =====*/

// remove the old one
var filteredArray = [].concat(resultsArray);
if(queryExecutor && !changed){
filteredArray = queryExecutor(resultsArray);
}
for(i = 0, l = resultsArray.length; i < l; i++){
var object = resultsArray[i];
if(store.getIdentity(object) == existingId){
if(filteredArray.indexOf(object)<0) continue;
removedObject = object;

@@ -79,0 +84,0 @@ removedFrom = i;

@@ -29,3 +29,27 @@ define(["dojo/aspect"], function(aspect){

},
function beforeMultipleRemoveInHandler(t){
var count = 0;
var error;
var obj = {
method: function(){}
};
var handle1 = aspect.before(obj, 'method', function(){
count++;
});
var handle2 = aspect.before(obj, 'method', function(){
count++;
handle2.remove();
handle1.remove();
});
try{
obj.method();
}catch(e){
error = e;
}
t.f(error, 'Calling method should not throw an error');
t.is(count, 1, 'Only one advising function should be called');
},
function after(t){

@@ -86,3 +110,3 @@ var order = [];

var order = [];
obj = {
var obj = {
foo: function(){}

@@ -96,2 +120,27 @@ };

},
function afterMultipleRemoveInHandler(t){
var count = 0;
var error;
var obj = {
method: function(){}
};
var handle1 = aspect.after(obj, 'method', function () {
handle1.remove();
handle2.remove();
count++;
});
var handle2 = aspect.after(obj, 'method', function () {
count++;
});
try{
obj.method();
}catch(e){
error = e;
}
t.f(error, 'Calling method should not throw an error');
t.is(count, 1, 'Only one advising function should be called');
},
function around(t){

@@ -166,3 +215,3 @@ var order = [];

foo.bar();
signal2.remove();

@@ -174,3 +223,3 @@ signal3.remove();

signal2.remove();
// This should execute only the first callback, but notice that the third callback

@@ -177,0 +226,0 @@ // is executed as well

@@ -44,2 +44,5 @@ define(["doh/main", "require", "dojo/_base/lang", "dojo/store/JsonRest"], function(doh, require, lang, JsonRest){

t.is(store.target + "foo", store._getTarget("foo"));
// and with an equals sign
store.target = store.target.slice(0, -1);
t.is(store.target + "=foo", store._getTarget("foo"));
},

@@ -46,0 +49,0 @@ function testQueryIterative(t){

@@ -38,3 +38,3 @@ define(["./_base/kernel", "./aspect", "./dom", "./dom-class", "./_base/lang", "./on", "./has", "./mouse", "./domReady", "./_base/window"],

return on(node, pointerType, listener);
}
};
}else if(hasTouch){

@@ -66,3 +66,3 @@ return function(node, listener){

return on(node, mouseType, listener);
}
};
}

@@ -78,3 +78,3 @@ }

}
function doClicks(e, moveType, endType){

@@ -88,3 +88,7 @@ // summary:

// to falsy.
if(mouse.isRight(e)){
return; // avoid spurious dojoclick event on IE10+; right click is just for context menu
}
var markedNode = marked(e.target);

@@ -96,3 +100,3 @@ clickTracker = !e.target.disabled && markedNode && markedNode.dojoClick; // click threshold = true, number, x/y object, or "useTarget"

if(useTarget){
// We expect a click, so prevent any other
// We expect a click, so prevent any other
// default action on "touchpress"

@@ -127,2 +131,5 @@ e.preventDefault();

win.doc.addEventListener(moveType, function(e){
if(mouse.isRight(e)){
return; // avoid spurious dojoclick event on IE10+; right click is just for context menu
}
updateClickTracker(e);

@@ -137,2 +144,5 @@ if(useTarget){

win.doc.addEventListener(endType, function(e){
if(mouse.isRight(e)){
return; // avoid spurious dojoclick event on IE10+; right click is just for context menu
}
updateClickTracker(e);

@@ -149,23 +159,32 @@ if(clickTracker){

var src = (e.changedTouches) ? e.changedTouches[0] : e;
//create the synthetic event.
//http://www.w3.org/TR/DOM-Level-3-Events/#widl-MouseEvent-initMouseEvent
var clickEvt = document.createEvent("MouseEvents");
clickEvt._dojo_click = true;
clickEvt.initMouseEvent("click",
true, //bubbles
true, //cancelable
e.view,
e.detail,
src.screenX,
src.screenY,
src.clientX,
src.clientY,
e.ctrlKey,
e.altKey,
e.shiftKey,
e.metaKey,
0, //button
null //related target
);
function createMouseEvent(type){
//create the synthetic event.
//http://www.w3.org/TR/DOM-Level-3-Events/#widl-MouseEvent-initMouseEvent
var evt = document.createEvent("MouseEvents");
evt._dojo_click = true;
evt.initMouseEvent(type,
true, //bubbles
true, //cancelable
e.view,
e.detail,
src.screenX,
src.screenY,
src.clientX,
src.clientY,
e.ctrlKey,
e.altKey,
e.shiftKey,
e.metaKey,
0, //button
null //related target
);
return evt;
}
var mouseDownEvt = createMouseEvent("mousedown");
var mouseUpEvt = createMouseEvent("mouseup");
var clickEvt = createMouseEvent("click");
setTimeout(function(){
on.emit(target, "mousedown", mouseDownEvt);
on.emit(target, "mouseup", mouseUpEvt);
on.emit(target, "click", clickEvt);

@@ -188,3 +207,3 @@

// we call click() explicitly, we don't want to stop this event.
if(!e._dojo_click &&
if(clickTracker && !e._dojo_click &&
(new Date()).getTime() <= clickTime + 1000 &&

@@ -217,103 +236,105 @@ !(e.target.tagName == "INPUT" && domClass.contains(e.target, "dijitOffScreen"))){

if(hasPointer){
// MSPointer (IE10+) already has support for over and out, so we just need to init click support
domReady(function(){
win.doc.addEventListener(pointer.down, function(evt){
doClicks(evt, pointer.move, pointer.up);
}, true);
});
}else if(hasTouch){
domReady(function(){
// Keep track of currently hovered node
hoveredNode = win.body(); // currently hovered node
if(has("touch")){
if(hasPointer){
// MSPointer (IE10+) already has support for over and out, so we just need to init click support
domReady(function(){
win.doc.addEventListener(pointer.down, function(evt){
doClicks(evt, pointer.move, pointer.up);
}, true);
});
}else{
domReady(function(){
// Keep track of currently hovered node
hoveredNode = win.body(); // currently hovered node
win.doc.addEventListener("touchstart", function(evt){
lastTouch = (new Date()).getTime();
win.doc.addEventListener("touchstart", function(evt){
lastTouch = (new Date()).getTime();
// Precede touchstart event with touch.over event. DnD depends on this.
// Use addEventListener(cb, true) to run cb before any touchstart handlers on node run,
// and to ensure this code runs even if the listener on the node does event.stop().
var oldNode = hoveredNode;
hoveredNode = evt.target;
on.emit(oldNode, "dojotouchout", {
relatedTarget: hoveredNode,
bubbles: true
});
on.emit(hoveredNode, "dojotouchover", {
relatedTarget: oldNode,
bubbles: true
});
// Precede touchstart event with touch.over event. DnD depends on this.
// Use addEventListener(cb, true) to run cb before any touchstart handlers on node run,
// and to ensure this code runs even if the listener on the node does event.stop().
var oldNode = hoveredNode;
hoveredNode = evt.target;
on.emit(oldNode, "dojotouchout", {
relatedTarget: hoveredNode,
bubbles: true
});
on.emit(hoveredNode, "dojotouchover", {
relatedTarget: oldNode,
bubbles: true
});
doClicks(evt, "touchmove", "touchend"); // init click generation
}, true);
doClicks(evt, "touchmove", "touchend"); // init click generation
}, true);
function copyEventProps(evt){
// Make copy of event object and also set bubbles:true. Used when calling on.emit().
var props = lang.delegate(evt, {
bubbles: true
});
function copyEventProps(evt){
// Make copy of event object and also set bubbles:true. Used when calling on.emit().
var props = lang.delegate(evt, {
bubbles: true
});
if(has("ios") >= 6){
// On iOS6 "touches" became a non-enumerable property, which
// is not hit by for...in. Ditto for the other properties below.
props.touches = evt.touches;
props.altKey = evt.altKey;
props.changedTouches = evt.changedTouches;
props.ctrlKey = evt.ctrlKey;
props.metaKey = evt.metaKey;
props.shiftKey = evt.shiftKey;
props.targetTouches = evt.targetTouches;
if(has("ios") >= 6){
// On iOS6 "touches" became a non-enumerable property, which
// is not hit by for...in. Ditto for the other properties below.
props.touches = evt.touches;
props.altKey = evt.altKey;
props.changedTouches = evt.changedTouches;
props.ctrlKey = evt.ctrlKey;
props.metaKey = evt.metaKey;
props.shiftKey = evt.shiftKey;
props.targetTouches = evt.targetTouches;
}
return props;
}
return props;
}
on(win.doc, "touchmove", function(evt){
lastTouch = (new Date()).getTime();
on(win.doc, "touchmove", function(evt){
lastTouch = (new Date()).getTime();
var newNode = win.doc.elementFromPoint(
evt.pageX - (ios4 ? 0 : win.global.pageXOffset), // iOS 4 expects page coords
evt.pageY - (ios4 ? 0 : win.global.pageYOffset)
);
var newNode = win.doc.elementFromPoint(
evt.pageX - (ios4 ? 0 : win.global.pageXOffset), // iOS 4 expects page coords
evt.pageY - (ios4 ? 0 : win.global.pageYOffset)
);
if(newNode){
// Fire synthetic touchover and touchout events on nodes since the browser won't do it natively.
if(hoveredNode !== newNode){
// touch out on the old node
on.emit(hoveredNode, "dojotouchout", {
relatedTarget: newNode,
bubbles: true
});
if(newNode){
// Fire synthetic touchover and touchout events on nodes since the browser won't do it natively.
if(hoveredNode !== newNode){
// touch out on the old node
on.emit(hoveredNode, "dojotouchout", {
relatedTarget: newNode,
bubbles: true
});
// touchover on the new node
on.emit(newNode, "dojotouchover", {
relatedTarget: hoveredNode,
bubbles: true
});
// touchover on the new node
on.emit(newNode, "dojotouchover", {
relatedTarget: hoveredNode,
bubbles: true
});
hoveredNode = newNode;
}
hoveredNode = newNode;
// Unlike a listener on "touchmove", on(node, "dojotouchmove", listener) fires when the finger
// drags over the specified node, regardless of which node the touch started on.
if(!on.emit(newNode, "dojotouchmove", copyEventProps(evt))){
// emit returns false when synthetic event "dojotouchmove" is cancelled, so we prevent the
// default behavior of the underlying native event "touchmove".
evt.preventDefault();
}
}
});
// Unlike a listener on "touchmove", on(node, "dojotouchmove", listener) fires when the finger
// drags over the specified node, regardless of which node the touch started on.
if(!on.emit(newNode, "dojotouchmove", copyEventProps(evt))){
// emit returns false when synthetic event "dojotouchmove" is cancelled, so we prevent the
// default behavior of the underlying native event "touchmove".
evt.preventDefault();
}
}
});
// Fire a dojotouchend event on the node where the finger was before it was removed from the screen.
// This is different than the native touchend, which fires on the node where the drag started.
on(win.doc, "touchend", function(evt){
lastTouch = (new Date()).getTime();
var node = win.doc.elementFromPoint(
evt.pageX - (ios4 ? 0 : win.global.pageXOffset), // iOS 4 expects page coords
evt.pageY - (ios4 ? 0 : win.global.pageYOffset)
) || win.body(); // if out of the screen
// Fire a dojotouchend event on the node where the finger was before it was removed from the screen.
// This is different than the native touchend, which fires on the node where the drag started.
on(win.doc, "touchend", function(evt){
lastTouch = (new Date()).getTime();
var node = win.doc.elementFromPoint(
evt.pageX - (ios4 ? 0 : win.global.pageXOffset), // iOS 4 expects page coords
evt.pageY - (ios4 ? 0 : win.global.pageYOffset)
) || win.body(); // if out of the screen
on.emit(node, "dojotouchend", copyEventProps(evt));
on.emit(node, "dojotouchend", copyEventProps(evt));
});
});
});
}
}

@@ -320,0 +341,0 @@

@@ -27,2 +27,3 @@ define(["./dom-geometry", "./_base/lang", "./domReady", "./sniff", "./_base/window"],

ie = has("ie"),
trident = has("trident"),
opera = has("opera"),

@@ -44,2 +45,3 @@ maj = Math.floor,

"dj_chrome": has("chrome"),
"dj_edge": has("edge"),

@@ -57,2 +59,6 @@ "dj_gecko": has("mozilla"),

}
if(trident){
classes["dj_trident"] = true;
classes["dj_trident" + maj(trident)] = true;
}
if(ff){

@@ -59,0 +65,0 @@ classes["dj_ff" + maj(ff)] = true;

@@ -133,7 +133,8 @@ define(["./_base/lang", "./sniff", "./_base/window", "./dom", "./dom-geometry", "./dom-style", "./dom-construct"],

html = doc.documentElement || body.parentNode,
isIE = has("ie"),
isIE = has("ie") || has("trident"),
isWK = has("webkit");
// if an untested browser, then use the native method
if(node == body || node == html){ return; }
if(!(has("mozilla") || isIE || isWK || has("opera") || has("trident")) && ("scrollIntoView" in node)){
if(!(has("mozilla") || isIE || isWK || has("opera") || has("trident") || has("edge"))
&& ("scrollIntoView" in node)){
node.scrollIntoView(false); // short-circuit to native if possible

@@ -171,5 +172,7 @@ return;

elPos.w = rootWidth; elPos.h = rootHeight;
if(scrollRoot == html && (isIE || has("trident")) && rtl){ elPos.x += scrollRoot.offsetWidth-elPos.w; } // IE workaround where scrollbar causes negative x
if(elPos.x < 0 || !isIE || isIE >= 9 || has("trident")){ elPos.x = 0; } // older IE can have values > 0
if(elPos.y < 0 || !isIE || isIE >= 9 || has("trident")){ elPos.y = 0; }
if(scrollRoot == html && (isIE || has("trident")) && rtl){
elPos.x += scrollRoot.offsetWidth-elPos.w;// IE workaround where scrollbar causes negative x
}
elPos.x = 0;
elPos.y = 0;
}else{

@@ -215,3 +218,3 @@ var pb = geom.getPadBorderExtents(el);

s = Math[l < 0? "max" : "min"](l, r);
if(rtl && ((isIE == 8 && !backCompat) || isIE >= 9 || has("trident"))){ s = -s; }
if(rtl && ((isIE == 8 && !backCompat) || has("trident") >= 5)){ s = -s; }
old = el.scrollLeft;

@@ -218,0 +221,0 @@ scrollElementBy(el, s, 0);

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc