forked from ibm-js/delite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
features.js
32 lines (28 loc) · 923 Bytes
/
features.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
define(["requirejs-dplugins/has"], function (has) {
// Flag for whether to create background iframe behind popups like Menus and Dialog.
// A background iframe is useful to prevent problems with popups appearing behind applets/pdf files.
has.add("config-bgIframe", false);
// Flag to enable advanced bidi support
has.add("bidi", false);
// Flag to enable inheritance direction from any ancestor
has.add("inherited-dir", false);
if (typeof window !== "undefined") {
// Returns the name of the method to test if an element matches a CSS selector.
has.add("dom-matches", function () {
var node = document.body;
if (node.matches) {
return "matches";
}
if (node.webkitMatchesSelector) {
return "webkitMatchesSelector";
}
if (node.mozMatchesSelector) {
return "mozMatchesSelector";
}
if (node.msMatchesSelector) {
return "msMatchesSelector";
}
});
}
return has;
});