Created
September 16, 2010 15:37
-
-
Save veged/582634 to your computer and use it in GitHub Desktop.
WITH
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 WITH(obj, parent) { | |
return function W(k, v, a) { | |
return (a = arguments.length) ? | |
(a - 1 ? (obj[k] = v, W) : WITH(obj[k], W)) : | |
parent || obj; | |
} | |
} | |
document.body.appendChild( | |
WITH(document.createElement('iframe')) | |
('scrolling', 'no') | |
('frameborder', 0) | |
('onload', function() { /* BLA */}) | |
('src', '//bla.bla') | |
('style') | |
('position', 'absolute') | |
('left', 0) | |
('top', 0) | |
('overflow', 'none') | |
('width', '100%') | |
('height', '100px') | |
('marginTop', '-160px') | |
('border', 'none') | |
() | |
()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment