timimahoney / decaf Goto Github PK
View Code? Open in Web Editor NEWThis project forked from webkit/webkit-http
Ruby in the browser.
Home Page: http://trydecaf.org
This project forked from webkit/webkit-http
Ruby in the browser.
Home Page: http://trydecaf.org
I want to know how exactly Decaf integrates Ruby with WebKit. Is it possible to handle the DOM through both JavaScript and Ruby or you have to move completely to Ruby?
I think JavaScript and Ruby are being horribly misunderstood here...
The app will crash if you multiply 1234567890 * 9876543210 in the console. This is probably a conversion between the large integer and the inspector number types.
I am happy with decaf, though not much document, I tried exploring it
ObjectSpace.each_object does not work, I wanted to know if it has been intentionally left out or we can expect it in future
All the pages in a process share the same DOM classes. This means that one site could monkey-patch a class and breach the security of another site. For example:
window.class.send(:define_method, :window) do
# Here, the script might have access to
# the Window of another site.
end
There are a few ways to fix this:
RB
class currently has a static VALUE
member that represents its class. We would replace this with a map of DOMWindow
to VALUE
. Then, we would convert RBObject::rubyClass()
to RBObject::rubyClass(DOMWindow*)
so that we know which window to get the class for.About half the time, the debugger won't stop on Ruby breakpoints. This sucks.
Hi, first of all, thanks for this awesome work. If there is anything that can take javascript down, it will have to run on the browser first.
Because of that, I would like to ask you if you plan on update decaf to recent webkit (or maybe Blink) and recent ruby version.
It's a shame that very few people know about this project. It's something that should definitely be on spotlight. You rock!
require 'set'
>>> "NoMethodError: undefined method `require' for #<Window:0x007f9ff2c33108>"
Kernel.require 'set'
>>> "LoadError: cannot load such file -- set"
Kernel.require 'observable'
>>> "LoadError: cannot load such file -- observable"
I get something like net/http
not being available, as the DOM provides interfaces. But things like Set
and Observable
ought to be available, no?
Gotta say I love this as it stands. If you could make this run only one site (no url bar) ala Fluid it would be great for my purposes.
Hi @TIMahoney,
Just saw this and thought it was interesting. I'm curious, though, as to how it compares to OpalRb, another project which uses Ruby in place of JavaScript.
I assume that this follows a similar principle as Opal, in that it transpiles Ruby to JavaScript. I'm also curious if this project works outside of WebKit, and if it's active / working anymore.
I was looking for programmatically open new window from console
$window.dup crashes the app every time
You can open the inspector with a keyboard shortcut, but not the console. There should be a shortcut for the console.
open google.com search for some stuff, opens the instant result page
if I am clicking on any of the links, it does not take me to it, but if right click, copy the link, open a new window and paste it works
I believe this should be in every browser going forward. Do you? If so, how may I help?
Not finding window.ActiveXObject (expected not to), or window.XMLHttpRequest (kinda surprised).
Are these not part of the webkit idl?
the output from the crash dialog.
Process: launchd [12964]
Path: /Applications/Decaf.app/Contents/MacOS/Decaf
Identifier: org.trydecaf.Decaf
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [164]
Date/Time: 2013-04-08 16:30:30.163 -0400
OS Version: Mac OS X 10.7.5 (11G63b)
Report Version: 9
Interval Since Last Report: 61306 sec
Crashes Since Last Report: 4
Per-App Crashes Since Last Report: 4
Anonymous UUID: 55F94468-2C3D-4E21-BEE9-081C68CCAE55
Crashed Thread: Unknown
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00007fff5fc01028
Backtrace not available
Unknown thread crashed with X86 Thread State (64-bit):
rax: 0x0000000000000055 rbx: 0x0000000000000000 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x0000000000000000 rsi: 0x0000000000000000 rbp: 0x0000000000000000 rsp: 0x0000000000000000
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x0000000000000000 r11: 0x0000000000000000
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x00007fff5fc01028 rfl: 0x0000000000010203 cr2: 0x00007fff5fc01028
Logical CPU: 4
Binary images description not available
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 1
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 12150
thread_create: 2
thread_set_state: 0
Model: MacBookPro8,2, BootROM MBP81.0047.B27, 4 processors, Intel Core i7, 2 GHz, 10 GB, SMC 1.69f4
Graphics: AMD Radeon HD 6490M, AMD Radeon HD 6490M, PCIe, 256 MB
Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 512 MB
Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353737334448302D4348392020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1333 MHz, 0x857F, 0x483634314755363746393333334700000000
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.106.198.19.22)
Bluetooth: Version 4.0.8f17, 2 service, 18 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: M4-CT256M4SSD2, 256.06 GB
Serial ATA Device: MATSHITADVD-R UJ-898
USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 3
USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfa100000 / 2
USB Device: BRCM2070 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0xfa110000 / 5
USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 8
USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0245, 0xfa120000 / 4
USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfd100000 / 2
USB Device: Trackball, 0x046d (Logitech Inc.), 0xc404, 0xfd120000 / 4
USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3
Will this support Linux?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.