Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: test/codegen/expect/sunflower/dom.js

Issue 1200233004: fixes #168, dart:js implementation with a test (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: fix error (window not defined) Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/codegen/expect/html_input.html ('k') | test/codegen/expect/sunflower/sunflower.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('dom', window, /* Imports */[ 1 dart_library.library('dom', window, /* Imports */[
2 "dart_runtime/dart", 2 "dart_runtime/dart",
3 'dart/core' 3 'dart/core'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 ], function(exports, dart, core) { 5 ], function(exports, dart, core) {
6 'use strict'; 6 'use strict';
7 let dartx = dart.dartx; 7 let dartx = dart.dartx;
8 class JsName extends core.Object { 8 class JsName extends core.Object {
9 JsName(opts) { 9 JsName(opts) {
10 let name = opts && 'name' in opts ? opts.name : null; 10 let name = opts && 'name' in opts ? opts.name : null;
11 this.name = name; 11 this.name = name;
12 } 12 }
13 } 13 }
14 dart.setSignature(JsName, { 14 dart.setSignature(JsName, {
15 constructors: () => ({JsName: [JsName, [], {name: core.String}]}) 15 constructors: () => ({JsName: [JsName, [], {name: core.String}]})
16 }); 16 });
17 class Overload extends core.Object { 17 class Overload extends core.Object {
18 Overload() { 18 Overload() {
19 } 19 }
20 } 20 }
21 dart.setSignature(Overload, { 21 dart.setSignature(Overload, {
22 constructors: () => ({Overload: [Overload, []]}) 22 constructors: () => ({Overload: [Overload, []]})
23 }); 23 });
24 let overload = dart.const(new Overload()); 24 let overload = dart.const(new Overload());
25 class CustomEvent extends core.Object {}
26 dart.setSignature(CustomEvent, {
27 constructors: () => ({CustomEvent: [CustomEvent, [core.String], {detail: dar t.dynamic, bubbles: dart.dynamic, cancelable: dart.dynamic}]})
28 });
29 class HTMLCollection extends core.Object {}
30 dart.setSignature(HTMLCollection, {
31 methods: () => ({get: [Element, [core.num]]})
32 });
25 let EventListener = dart.typedef('EventListener', () => dart.functionType(dart .void, [Event])); 33 let EventListener = dart.typedef('EventListener', () => dart.functionType(dart .void, [Event]));
26 let InputElement = HTMLInputElement; 34 let InputElement = HTMLInputElement;
27 let CanvasElement = HTMLCanvasElement; 35 let CanvasElement = HTMLCanvasElement;
36 let DivElement = HTMLDivElement;
37 let ScriptElement = HTMLScriptElement;
28 class RenderingContext extends core.Object {} 38 class RenderingContext extends core.Object {}
29 class CanvasDrawingStyles extends core.Object { 39 class CanvasDrawingStyles extends core.Object {
30 CanvasDrawingStyles() { 40 CanvasDrawingStyles() {
31 this.lineWidth = null; 41 this.lineWidth = null;
32 this.lineCap = null; 42 this.lineCap = null;
33 this.lineJoin = null; 43 this.lineJoin = null;
34 this.miterLimit = null; 44 this.miterLimit = null;
35 this.lineDashOffset = null; 45 this.lineDashOffset = null;
36 this.font = null; 46 this.font = null;
37 this.textAlign = null; 47 this.textAlign = null;
38 this.textBaseline = null; 48 this.textBaseline = null;
39 } 49 }
40 } 50 }
41 class CanvasPathMethods extends core.Object {} 51 class CanvasPathMethods extends core.Object {}
42 // Exports: 52 // Exports:
43 exports.JsName = JsName; 53 exports.JsName = JsName;
44 exports.Overload = Overload; 54 exports.Overload = Overload;
45 exports.overload = overload; 55 exports.overload = overload;
56 exports.CustomEvent = CustomEvent;
57 exports.HTMLCollection = HTMLCollection;
46 exports.EventListener = EventListener; 58 exports.EventListener = EventListener;
47 exports.InputElement = InputElement; 59 exports.InputElement = InputElement;
48 exports.CanvasElement = CanvasElement; 60 exports.CanvasElement = CanvasElement;
61 exports.DivElement = DivElement;
62 exports.ScriptElement = ScriptElement;
49 exports.RenderingContext = RenderingContext; 63 exports.RenderingContext = RenderingContext;
50 exports.CanvasDrawingStyles = CanvasDrawingStyles; 64 exports.CanvasDrawingStyles = CanvasDrawingStyles;
51 exports.CanvasPathMethods = CanvasPathMethods; 65 exports.CanvasPathMethods = CanvasPathMethods;
52 }); 66 });
OLDNEW
« no previous file with comments | « test/codegen/expect/html_input.html ('k') | test/codegen/expect/sunflower/sunflower.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698