The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
| .sidebar_newsletter_sign_up, | |
| .sidebar_subscribe, | |
| .sign-up-form-single, | |
| .signup-form--header, | |
| .signup-with-checkboxes, | |
| .skinny-sign-up, | |
| .slidedown-newsletter, | |
| .small-newsletter, | |
| .social-link-mail, | |
| .social_newsletter_box, |
| <?php | |
| function gfm($text){ | |
| # Extract pre blocks | |
| $extractions = array(); | |
| $text = preg_replace_callback('/<pre>.*?<\/pre>/s', function($matches) use (&$extractions){ | |
| $match = $matches[0]; | |
| $md5 = md5($match); | |
| $extractions[$md5] = $match; |
| package ; | |
| import haxe.ds.StringMap; | |
| import haxe.macro.Context; | |
| import haxe.macro.Expr; | |
| import haxe.macro.Printer; | |
| import haxe.macro.Type.ClassType; | |
| import neko.Lib; | |
| using haxe.macro.ExprTools; |
| class Point implements UnifyCheck<{x:Int}> { | |
| public var x:Int; | |
| } | |
| class Main { | |
| static function main() { | |
| } | |
| } |
| class Main { | |
| static function main(){ | |
| var router = Paths.buildRouter(Page); | |
| var o = router(["Home"]); | |
| trace(o + " is the value for o"); | |
| var p = router(["Foo","Baz", "1"]); | |
| trace(p + " is the value for p"); |
| package util; | |
| /** | |
| * ... | |
| * @author Kevin | |
| */ | |
| @:build(util.AssetPathsMacro.build()) | |
| class AssetPaths | |
| { |
| const a = [1,2,3]; | |
| var acc = 0; | |
| for (const v of a) { | |
| acc += v; | |
| } | |
| // want clean code? use Array.reduce | |
| console.log(acc); |
| class KeyValueIterator<K,V> { | |
| var map:Map<K,V>; | |
| var keys:Iterator<K>; | |
| static public inline function pairs<K,V>(map:Map<K,V>) return new KeyValueIterator(map); | |
| public inline function new(map:Map<K,V>) { | |
| this.map = map; | |
| this.keys = map.keys(); | |
| } |
| /* | |
| Automatically generate dispatch functions as: | |
| public function onDoubleArguments(one:String, two:Int) { | |
| for (listener in listeners) | |
| listener.onDoubleArguments(one, two); | |
| } | |
| */ | |
| class Example extends Dispatcher<Dynamic> | |
| { |