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

Running the Codelabs "Pirate badge" example in JavaScript doesn't work in Firefox (Step 7: Build the app and run as JavaScript) #19489

Closed
DartBot opened this issue Jun 16, 2014 · 17 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html P0 A serious issue requiring immediate resolution
Milestone

Comments

@DartBot
Copy link

DartBot commented Jun 16, 2014

This issue was originally filed by stefan.s...@gmail.com


What steps will reproduce the problem?

  1. Following all the steps of https://www.dartlang.org/codelabs/darrrt/
  2. Step 7, using the HTML file from directory 6-piratebadge to be sure.
  3. Running in Firefox

What is the expected output? What do you see instead?
Typing a name should show the name in the badge. Instead there's an error (JavaScript console):
TypeError: J.getInterceptor$x(...).get$target is not a function piratebadge.dart.js:6588

What version of the product are you using? On what operating system?
Dart 1.4.2.release (STABLE)
Firefox 31 (Beta)
Mac OS X 10.9.3

Please provide any additional information below.
Works OK in Dartium, Google Chrome 35.0.1916.153, and Safari 7.0.4
The button for random names works in Firefox. There's only a problem with the input field.

There's a syntax error regarding the source map. Don't know if this is relevant for this bug:
SyntaxError: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead piratebadge.dart.js:7262

@kasperl
Copy link

kasperl commented Jun 17, 2014

cc @rakudrama.
Added Area-Library, Library-Html, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jun 17, 2014

This comment was originally written by stefan.s...@gmail.com


Additional information: Step 2 of the tutorial works in Firefox. A name appears in the badge as soon as you type.

First step with the reported problem: Step 3.

@DartBot
Copy link
Author

DartBot commented Jun 17, 2014

This comment was originally written by cogman...@gmail.com


Should be noted this issue appears in Firefox 31 beta, The code appears to work in Firefox 30 and Firefox Aurora (32)

@kwalrath
Copy link
Contributor

Oops, I filed a bug too. 19509.

@munificent
Copy link
Member

Issue #19509 has been merged into this issue.

@DartBot
Copy link
Author

DartBot commented Jun 18, 2014

This comment was originally written by stefan.s...@gmail.com


Reported to Mozilla as well: https://bugzilla.mozilla.org/show_bug.cgi?id=1027011

Be aware: It isn't a Mozilla bug if the difference between Firefox 30/32 to Firefox 31 is within the standard. It's just reported and no cause of the error is determined yet.

@floitschG
Copy link
Contributor

I looked a little bit into it.

in FF30 the getNativeInterceptor succeeds whereas in FF31 it fails.

in FF30:
proto == objectProto == EventPrototype

in FF31:
proto == UIEventPrototype
objectProto == InputEventPrototype

the tag is "InputEvent".

I hope this helps Stephen (or someone else in Seattle) to fix the issue.


cc @blois.

@DartBot
Copy link
Author

DartBot commented Jun 27, 2014

This comment was originally written by ope...@mozilla.com


Any news on this one? Firefox 31, which implements InputEvent (defined in W3C DOM 3 Events) will be released in 3.5 weeks

@efortuna
Copy link
Contributor

I looked into it. The issue is upstream. We're generating our bindings from Blink IDL, the current version of which doesn't seem to have InputEvent. Dart sometimes lags behind latest Blink, but I just checked Chrome Canary (Version 38.0.2071.0) and no dice there, either (strange!).

Presumably Chrome/Blink is implementing this soon? I did a quick web search but couldn't find any tracking bugs. Jacob, do you know who could fill us in on the Blink status of this?


cc @jacob314.

@DartBot
Copy link
Author

DartBot commented Jun 28, 2014

This comment was originally written by @sethladd


Can we assign a milestone? Do you think this will be fixed in 1.6?

@jmesserly
Copy link

Sigh, had typed a much longer comment but got lost due to simultaneous update :(

@sethladd -- yes, this is critical and should be fixed in 1.6. Not only that, if it affects already compiled apps (https://code.google.com/p/dart/issues/detail?id=13285) we have to backport it to 1.5 stable and get the word out to recompile affected apps...

@efortuna -- I think the fix is in native_helper.dart. There's getTagFirefox in there, but I don't think we should put it there since this is a new standard Event: http://www.w3.org/TR/DOM-Level-3-Events/ not a browser specific API. Instead we should add a generic hook similar to _fixDocumentHooksTransformer (I think ... the code has changed completely since I last looked).


Added this to the 1.6 milestone.
Removed Priority-Unassigned label.
Added Priority-Critical label.

@jmesserly
Copy link

p.s. thank you Stefan for pinging this bug! (https://news.ycombinator.com/item?id=7956827)

@DartBot
Copy link
Author

DartBot commented Jun 28, 2014

This comment was originally written by ope...@mozilla.com


"We're generating our bindings from Blink IDL, the current version of which doesn't seem to have InputEvent. Dart sometimes lags behind latest Blink, but I just checked Chrome Canary (Version 38.0.2071.0) and no dice there, either (strange!). "

What is strange with that? Blink is behind other browsers in many event handling
related cases.

@DartBot
Copy link
Author

DartBot commented Jun 28, 2014

This comment was originally written by bzb...@mit.edu


In general, Blink's IDL doesn't match the spec IDL in many cases. So if you generate bindings based on Blink's IDL and expect them to work in other browsers, you will definitely run into problems.

@efortuna
Copy link
Contributor

No, the Blink IDL is our starting point of API generation, but we make adjustments to run for other browsers. I'll make the change in native_helper.dart. CL will be out shortly.

@efortuna
Copy link
Contributor

Fix put in at r37838!


Set owner to @efortuna.
Added Fixed label.

@kwalrath
Copy link
Contributor

Marked this as blocking #20148.

@DartBot DartBot added Type-Defect P0 A serious issue requiring immediate resolution area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html labels Jul 22, 2014
@DartBot DartBot added this to the 1.6 milestone Jul 22, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-html P0 A serious issue requiring immediate resolution
Projects
None yet
Development

No branches or pull requests

7 participants