Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sea shell newt #37

Merged
merged 3 commits into from
Mar 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Caravel.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Pod::Spec.new do |s|
# summary should be tweet-length, and the description more in depth.
#

version = "1.1.0"
version = "1.1.1"

s.name = "Caravel"
s.version = version
Expand Down
2 changes: 1 addition & 1 deletion caravel/internal/proxies/WKScriptMessageHandlerProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ internal class WKScriptMessageHandlerProxy: NSObject, WKScriptMessageHandler {
let eventData = body["eventData"]

iterateOverDelegates { e in
background { e.onMessage(busName, eventName: eventName, eventData: eventData) }
e.onMessage(busName, eventName: eventName, eventData: eventData)
}
}
}
2 changes: 1 addition & 1 deletion caravel/js/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = function (grunt) {
'use strict';

var version = '1.1.0';
var version = 'sea-shell-newt-v1.1.1';

// Project configuration
grunt.initConfig({
Expand Down
9 changes: 6 additions & 3 deletions caravel/js/caravel.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ class Caravel

# Internal method for posting
_post: (eventName, data) ->
action = null

if @isUsingWKWebView
body =
busName: @name
eventName: eventName
eventData: data
setTimeout (() => window.webkit.messageHandlers.caravel.postMessage(body)), 0
action = () => window.webkit.messageHandlers.caravel.postMessage(body)
else
# shouldLoadRequest is only triggered when a new content is required
# Ajax requests are useless
setTimeout (() =>
action = () =>
iframe = document.createElement 'iframe'
src = "caravel://host.com?busName=#{encodeURIComponent(@name)}&eventName=#{encodeURIComponent(eventName)}"
if data?
Expand All @@ -33,7 +35,8 @@ class Caravel
iframe.setAttribute 'src', src
document.documentElement.appendChild iframe
iframe.parentNode.removeChild iframe
), 0

setTimeout(action, 0)

getName: () ->
@name
Expand Down
4 changes: 2 additions & 2 deletions caravel/js/caravel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ disabled_rules: # rule identifiers to exclude from running
- trailing_whitespace
# - type_body_length
# - type_name
# - variable_name
- variable_name
- variable_name_min_length
# - variable_name_max_length
included: # paths to include during linting. `--path` is ignored if present. takes precendence over `excluded`.
Expand Down