This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a string of an element, showing the node name and all attributes. | |
* This is mainly useful for debugging in Internet Explorer where a DOM node | |
* representation isn't shown in the console. | |
* | |
* @param {Element} elem Element to stringify. | |
* @return {string} String representation of the element. | |
*/ | |
function stringifyElem(elem) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dom = { | |
toArray: function (nodes) { | |
var array = []; | |
if (nodes) { | |
array = typeof nodes.length === 'number' ? | |
Array.prototype.slice.call(nodes) : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var createClass = (function () { | |
'use strict'; | |
// Basic no-operation function | |
var noop = function () { | |
return; | |
}, | |
// Tests to see whether or not regular expressions can be called on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* watch(element, attribute, handler) | |
* - element (Element): Element whose attribute should be watched for changes. | |
* - attribute (String): Attribute to watch. | |
* - handler (Function): Function to execute when the attribute changes. | |
* | |
* `watch` allows DOM Nodes to have their attributes watched for changes. | |
* Internally, this function uses the most efficient mean possible to watch for | |
* the change (more in the **Configuring** section). | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
MIT license. | |
Copyright (c) 2015 James "Skateside" Long | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* access | |
* | |
* Created by calling the `Access` function. | |
* | |
* var a1 = Access(); | |
* var a2 = new Access(); | |
* | |
* Initial data can be passed, see [[access.addData]]. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* observer | |
* | |
* A namespace for observers. To create one, simply call the `makeObserver` | |
* function: | |
* | |
* var observer = makeObserver(); | |
* | |
* This allows multiple observers to be run if needed. Subscribe to events | |
* using [[observer.on]], unsubscribe using [[observer.off]] and trigger events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $.am(); | |
// $.addAm(); | |
// $.removeAm(); | |
// $.hasAm(); | |
// $.normaliseAm() and $.normalizeAm() | |
// $.amHooks | |
// $.AM_PREFIX | |
describe("jQuery#am", function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function polyfill(object, name, value) { | |
if (typeof object[name] !== typeof value) { | |
Object.defineProperty(object, name, { | |
value, | |
configurable: true, | |
enumerable: false, | |
writable: true | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let types = [ | |
[Aria.Property, [ | |
"atomic", | |
]], | |
[Aria.ReferenceCollection, [ | |
"controls", | |
]], | |
[Aria.State, [ | |
"busy", | |
"current", |