Socket
Socket
Sign inDemoInstall

dojo

Package Overview
Dependencies
Maintainers
3
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.11.3 to 1.11.4

4

_base/kernel.js

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

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

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

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

@@ -100,0 +100,0 @@ toString: function(){

define([
"../_base/array", "../_base/declare", "../_base/lang",
"../dom", "../dom-class", "../Evented", "../on", "../topic", "../touch", "./common", "./Mover", "../_base/window"
], function(array, declare, lang, dom, domClass, Evented, on, topic, touch, dnd, Mover, win){
"../_base/array", "../_base/declare", "../_base/lang", "../dom", "../dom-class", "../Evented",
"../has", "../on", "../topic", "../touch", "./common", "./Mover", "../_base/window"
], function(array, declare, lang, dom, domClass, Evented, has, on, topic, touch, dnd, Mover, win){

@@ -9,3 +9,23 @@ // module:

var touchActionPropertyName;
var setTouchAction = function () {};
function setTouchActionPropertyName() {
if ("touchAction" in document.body.style) {
touchActionPropertyName = "touchAction";
}
else if ("msTouchAction" in document.body.style) {
touchActionPropertyName = "msTouchAction";
}
setTouchAction = function setTouchAction(/* Node */ node, /* string */ action) {
node.style[touchActionPropertyName] = action;
}
setTouchAction(arguments[0], arguments[1]);
}
if (has("touch-action")) {
// Ensure that the logic to determine "touchActionPropertyName" runs
setTouchAction = setTouchActionPropertyName;
}
var Moveable = declare("dojo.dnd.Moveable", [Evented], {

@@ -26,2 +46,3 @@ // summary:

this.node = dom.byId(node);
setTouchAction(this.node, "none");
if(!params){ params = {}; }

@@ -51,2 +72,3 @@ this.handle = params.handle ? dom.byId(params.handle) : null;

array.forEach(this.events, function(handle){ handle.remove(); });
setTouchAction(this.node, "");
this.events = this.node = this.handle = null;

@@ -53,0 +75,0 @@ },

@@ -48,6 +48,8 @@ define(["./sniff", "./dom", "./_base/window"], function(has, dom, win){

getComputedStyle = function(node){
var dv = node.ownerDocument.defaultView,
w = dv.opener ? dv : win.global.window.parent;
return node.nodeType == 1 /* ELEMENT_NODE*/ ?
w.getComputedStyle(node, null) : {};
if(node.nodeType === 1 /* ELEMENT_NODE*/){
var dv = node.ownerDocument.defaultView,
w = dv.opener ? dv : win.global.window;
return w.getComputedStyle(node, null);
}
return {};
};

@@ -54,0 +56,0 @@ }

@@ -119,2 +119,6 @@ define(["require", "module"], function(require, module){

has.add("MSPointer", window.navigator.msPointerEnabled);
// The "pointermove"" event is only continuously emitted in a touch environment if
// the target node's "touch-action"" CSS property is set to "none"
// https://www.w3.org/TR/pointerevents/#the-touch-action-css-property
has.add("touch-action", has("touch") && has("pointer-events"));

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

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

}
//use event.changedTouches[0].pageX|pageY|screenX|screenY|clientX|clientY|target
var firstChangeTouch = event.changedTouches[0];
for(var i in firstChangeTouch){ // use for-in, we don't need to have dependency on dojo/_base/lang here
delete event[i]; // delete it first to make it mutable
event[i] = firstChangeTouch[i];
if (window.TouchEvent && originalEvent instanceof TouchEvent) {
// use event.changedTouches[0].pageX|pageY|screenX|screenY|clientX|clientY|target
var firstChangeTouch = event.changedTouches[0];
for(var i in firstChangeTouch){ // use for-in, we don't need to have dependency on dojo/_base/lang here
delete event[i]; // delete it first to make it mutable
event[i] = firstChangeTouch[i];
}
}

@@ -591,0 +593,0 @@ }

{
"name": "dojo",
"version": "1.11.3",
"version": "1.11.4",
"directories": {

@@ -14,3 +14,3 @@ "lib": "."

"sinon": "1.12.2",
"dojo": "1.11.3"
"dojo": "1.11.4"
},

@@ -17,0 +17,0 @@ "main": "main",

@@ -9,4 +9,5 @@ define([

'../_base/lang',
'../promise/Promise'
], function(exports, RequestError, CancelError, Deferred, ioQuery, array, lang, Promise){
'../promise/Promise',
'../has'
], function(exports, RequestError, CancelError, Deferred, ioQuery, array, lang, Promise, has){
exports.deepCopy = function deepCopy(target, source){

@@ -125,3 +126,3 @@ for(var name in source){

if(data && !skipData){
if(typeof data === 'object' && !(data instanceof ArrayBuffer || data instanceof Blob )){
if(typeof data === 'object' && (!(has('native-xhr2')) || !(data instanceof ArrayBuffer || data instanceof Blob ))){
options.data = ioQuery.objectToQuery(data);

@@ -128,0 +129,0 @@ }

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

});
// Since we can't simulate invoking TouchEvents (with current browsers initTouchEvent isn't available)
// we will make TouchEvent be an Event temporarily so the `on` implementation
// thinks that it is one for this test.
var originalTouchEvent = window.TouchEvent;
window.TouchEvent = Event;
on.emit(div, 'touchstart', { changedTouches: [{ pageX: 100 }] });
window.TouchEvent = originalTouchEvent;

@@ -606,2 +612,16 @@ assert.property(lastEvent, 'rotation');

});
has('touch') && (suite['DOM-specific']['touch event normalization doesn\'t happen to non-TouchEvent'] = function () {
var div = document.body.appendChild(document.createElement('div'));
var lastEvent;
on(div, 'touchstart', function (event) {
// Copying event properties to an object because certain versions of Firefox
// threw insecure operation errors when saving an event to a closure-bound variable.
lastEvent = lang.mixin({}, event);
});
on.emit(div, 'touchstart', { changedTouches: [{ pageX: 100 }] });
assert.isFalse(lastEvent.pageX === 100);
});
}

@@ -608,0 +628,0 @@

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