This file contains hidden or 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
// Lists primarily based on MSHTML support IE5 through IE11 | |
// Namespaces | |
const nsXHTML = "http://www.w3.org/1999/xhtml"; | |
const nsSVG = "http://www.w3.org/2000/svg"; | |
const nsMATHML = "http://www.w3.org/1998/Math/MathML"; | |
const nsXML = "http://www.w3.org/XML/1998/namespace"; | |
// "x-ms-webview" added for WWA | |
// "main" tag added for EdgeHTML |
This file contains hidden or 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
// Per spec configures a location on the global of name Node with a value | |
// of the instance of the function. | |
function ANode() { | |
} | |
// We derive from Object | |
ANode.prototype = Object.create(Object.prototype); | |
// Complete the loop back to ourselves | |
ANode.prototype.constructor = ANode; |
This file contains hidden or 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
// Utilize duck typed slice, to enumerate 0..length indices. | |
// Indices on CSSStyleDeclaration return the "parser" names for properties. | |
// Based on the parser names, determine the vendor prefix to use. | |
var vendor_prefix = Array.prototype.slice.call(window.getComputedStyle(document.body)).join('').match(/-(ms|webkit|moz)-/)[0]; | |
console.log(vendor_prefix); |
This file contains hidden or 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
<script> | |
var r = {}; | |
r.VENDOR_PREFIX = function () { | |
var e = /^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/, t = document.getElementsByTagName("script")[0].style, n; | |
for (n in t) | |
if (e.test(n)) | |
return n.match(e)[0].toLowerCase(); | |
return "WebkitOpacity" in t ? "webkit" : "KhtmlOpacity" in t ? "khtml" : ""; | |
}(); | |
</script> |
This file contains hidden or 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
// http://jsfiddle.net/w3mw1r4q/ | |
var ary = Array.apply(null, document.body.children); | |
console.log(Array.isArray(document.body.children)); | |
console.log(Array.isArray(ary)); | |
console.log(ary.length); |
This file contains hidden or 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
// http://jsfiddle.net/8n6c1dpz/12/ | |
var out = document.getElementById("output"); | |
var vendorPrefixes = [/^ms|^onms/i, /^moz|^onmoz/i, /^webkit|^onwebkit/i]; | |
var vendorProps = vendorPrefixes.map(function (prefix) { | |
return Object.getOwnPropertyNames(window).filter(function (name) { | |
try { | |
return (this[name].prototype && this[name].prototype.constructor === this[name]); | |
} catch (exc) { | |
return false; |
This file contains hidden or 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
// http://jsfiddle.net/s4ex1dtj/ | |
"use strict"; | |
var myImage = new Image(); | |
Object.defineProperty(myImage, "src", { | |
get: function () { return 'foo'; }, | |
set: function (val) { alert(val); } }); | |
console.log(myImage.src); // Logs value 'foo' | |
myImage.src = "new"; // alerts value 'new' | |
// newImage does not have a redefined setter since our previous property |
This file contains hidden or 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 token() { | |
this.value = ''; | |
this.type = 'error'; | |
} | |
// Static methods on token | |
Object.defineProperties(token, { | |
createOther: { | |
value: function createOther(val) { |
This file contains hidden or 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 request = require('request'); | |
var cheerio = require('cheerio'); | |
var urls = [ | |
'https://developer.android.com/reference/com/google/android/gms/location/Geofence.html', | |
'http://developer.android.com/reference/com/google/android/gms/maps/model/LatLng.html' | |
]; | |
urls.forEach(function (elem) { | |
request({ |
This file contains hidden or 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 config = { | |
forward_server: 'msdl.microsoft.com', | |
forward_path: '/download/symbols', | |
forward_port: 80, | |
allow_list: [ | |
/\/ntdll.pdb\// | |
], | |
}; | |
module.exports = config; |