Questions tagged [dart-html]

Dart HTML allows access to basic browser features like the DOM, FileSystem, Websockets and other things.

Dart HTML provides access to basic browser features like the DOM, FileSystem, Websockets and other things. It doesn't provide the same interfaces to the DOM that JavaScript has, but provides a much richer interface to the DOM. Some browser features, like SVG, WebGL and Web Audio have their own libraries.

dart:html library

Connect Dart & HTML

474 questions
5
votes
1 answer

How to add HTML entities in Dart?

I want to add HTML entities like   or & using a Dart class. I tried this : my_element.nodes.add(new Text('&©')); but as mentioned in Text class doc, markup is parsed into information, meaning everything is escaped, I guess. I…
Eric Lavoie
  • 5,121
  • 3
  • 32
  • 49
5
votes
1 answer

How to use animationFrame in Dart?

The following code throws the exception "type '([int]) => void' is not a subtype of type 'RequestAnimationFrameCallback' of 'callback'." import 'dart:html'; void main() { window.animationFrame.then((time) => print("test")); } If I change…
Sydius
  • 13,567
  • 17
  • 59
  • 76
4
votes
1 answer

How to keep the Url parameters in Flutter web route path

I am building a flutter web app which requires a url parameter in the start. Currently it needs a parameter like http://localhost:49844/?id=105897 But after the app catches the url it disappears (like http://localhost:49844/#/) from the web address…
4
votes
0 answers

How to use dart Future in js?

this is my sample programe: import 'dart:html'; import 'package:js/js.dart'; import 'package:js/js_util.dart'; void main() { setProperty(window, 'login', allowInterop(login)); } Future login (String username,String password) async { …
Dorbmon
  • 115
  • 1
  • 5
4
votes
0 answers

How to make XSL transforms in Dart

The XsltProcessor class from the dart:html library is deprecated. What library should I use to make XSL transforms in Dart?
Patrick
  • 3,578
  • 5
  • 31
  • 53
4
votes
1 answer

Dart: How to fix the condition?

I'm a newbie. I create an angular application using the IDEA template and insert the code from the example:

Expression is true and ngIf is true. This paragraph is in the DOM.

An error occurs: [INFO] …
VINET
  • 641
  • 1
  • 7
  • 28
4
votes
2 answers

Dart: "Invalid argument(s): Illegal character in path" when building on Windows

The offending line in my index.html file reads The error report is: Build error: Transform polymer (PolymerBootstrapTransformer) on myproj_frontend|web/index.html threw error: Invalid…
S. J.
  • 1,106
  • 1
  • 10
  • 23
4
votes
1 answer

Dart: wait for callback before continuing

I was wondering whether it's possible to wait for a callback before continuing a process. I'm using a library that handles a future internally and then if it was successful, does a callback, otherwise handles the error internally with no…
Jan Vladimir Mostert
  • 12,380
  • 15
  • 80
  • 137
4
votes
1 answer

Failed to load dartium when running test

I'm running dart test using test library. pub run test -p dartium When this command is executed I'm getting below error, I have dartium and dart sdk downloaded and in system path. Failed to start Dartium: No such file or directory Command:…
ashokd
  • 393
  • 2
  • 11
4
votes
2 answers

Get the width of custom element created using in dart?

How do I get the width of a custom element from the element's script?
blah
@CustomTag('his-elem') class blah extends PolymerElement { @override void attached() { //…
Not an ID
  • 2,579
  • 2
  • 21
  • 28
4
votes
2 answers

DART post with multipart/form-data

in DART lang, how to specify POST request Content-Type to be multipart/form-data My DART code is: sendDatas(dynamic data) { final req = new HttpRequest(); req.onReadyStateChange.listen((Event e) { if (req.readyState == HttpRequest.DONE && …
bboy
  • 1,357
  • 2
  • 15
  • 31
4
votes
3 answers

How to make HTTPS request using HttpClient in dart?

I'm using HttpClient from dart (dart:io package, NOT dart:http) and I'd like to send an HTTPS request. Is there a way to do that? I can't seem to find a method that would allow me that.
markovuksanovic
  • 15,676
  • 13
  • 46
  • 57
4
votes
1 answer

Billboarding in Dart WebGL

I've been trying to create billboarding effects for a game I'm making in dart using lwjgl. I've been reading that you should have each billboard vertex is at the worlds center position and then just displace them by the cameras vectors. I do not…
Dramentiaras
  • 193
  • 1
  • 3
  • 12
4
votes
2 answers

dart:io and dart:html being mutually exclusive

I've run into a similar situation to this chap where I'd like to have dart:io and dart:html in the same application. I know that dart:io is a server-side library and dart:html is a client side. My situation is as follows. I have a program to outputs…
Phlox Midas
  • 4,093
  • 4
  • 35
  • 56
4
votes
2 answers

Geolocation with Dart in Firefox getCurrentPosition not a function

I have written this code in Dart window.navigator.geolocation.getCurrentPosition((Geoposition position) { window.alert(position.coords.latitude.toString()); }); When I run it in Dantium or Google Chrome it works fine, but if I try running this…
James Hurford
  • 2,018
  • 19
  • 40
1 2
3
31 32